[Commits] [SCM] claws branch, master, updated. 3.17.0-46-g1c069e3
Andrej Kacian
ticho at claws-mail.org
Fri Sep 7 08:18:57 CEST 2018
On Fri, 7 Sep 2018 01:49:33 +0200
Ricardo Mones wrote:
> On Thu, 6 Sep 2018 22:14:26 +0200 (CEST)
> ticho at claws-mail.org wrote:
>
> > + debug_print("Could not find a NULL byte in the decrypted
> > password.\n");
> > + valid_utf8 = FALSE;
> > + } else {
> > + /* There is a NULL byte, we can rely on strlen() returning
>
> I find this “NULL byte” peculiar: NULL, even being 0 most of the time, is a
> pointer and probably never byte sized ;-) maybe you wanted to mean NUL?
Wikipedia disagrees - the full name is "null character", with "NUL"
being an abbreviation, similar to CR or LF. :)
https://en.wikipedia.org/wiki/Null_character
> > + if (!valid_utf8)
> > + debug_print("Decrypted password is not a valid UTF-8
> > string!\n");
> > + cm_return_val_if_fail(valid_utf8, NULL);
>
> What about a g_warning() instead to make these failures readily available in
> console?
Isn't output of cm_return_val_if_fail() available in console as well?
It is for me. Anyway, I like it because of the backtrace it spits
out. :)
Regards,
--
Andrej
More information about the Commits
mailing list