Re: [PATCH] Fix memory leaks in scanner
- From: Santtu Lakkala <inz inz fi>
- To: easytag-list gnome org
- Subject: Re: [PATCH] Fix memory leaks in scanner
- Date: Mon, 17 Feb 2014 09:55:16 +0200
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 11/02/14 12:34, David King wrote:
Hi Santtu
On 2014-02-11 11:53, Santtu Lakkala <inz inz fi> wrote:
The Scan_Process_Fields_First_Letters_Uppercase() uses
g_utf8_strup in roman numeral handling, but does not free the
result.
Thanks for the patch, I slightly modified the formatting and pushed
it to master:
https://git.gnome.org/browse/easytag/commit/?id=ae3dd7b81ba283ba0e9ea3d4aff326deedcc077e
Hmm, now that I think of it, maybe we should use g_ascii_strup() in
roman numeral handling to make it work correctly in Turkish locale
(see setlocale comment in ET_Add_File_To_File_List()).
Also the scanner code is riddled with assumption that strlen(x) ==
strlen(g_utf8_str{up/down}), which is wrong. (again, comment in
ET_Add_File_To_File_List()). This assumption was actually partly
introduced by me, when I did not know better.
I guess most of the scanner code should be rewritten, maybe using
GString and/or regexes where applicable to be totally utf-safe.
- --
Santtu Lakkala
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.14 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iEYEARECAAYFAlMBwGQACgkQX9Rc0+po4p3s6QCfeVZCzU30r9OsbygaA40qpngg
5pYAnixgzyMsEgrZv4sda+jGhIRPhN5d
=NLPN
-----END PGP SIGNATURE-----
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]