This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[review v6] localedef: Add verbose messages for failure paths.
- From: "Carlos O'Donell (Code Review)" <gerrit at gnutoolchain-gerrit dot osci dot io>
- To: libc-alpha at sourceware dot org
- Cc: Adhemerval Zanella <adhemerval dot zanella at linaro dot org>, Florian Weimer <fweimer at redhat dot com>, Simon Marchi <simon dot marchi at polymtl dot ca>
- Date: Wed, 18 Dec 2019 23:37:37 -0500
- Subject: [review v6] localedef: Add verbose messages for failure paths.
- Auto-submitted: auto-generated
- References: <gerrit.1571944987000.I28b9f680711ff00252a2cb15625b774cc58ecb9d@gnutoolchain-gerrit.osci.io>
- Reply-to: gnutoolchain-gerrit at osci dot io
Carlos O'Donell has posted comments on this change.
Change URL: https://gnutoolchain-gerrit.osci.io/r/c/glibc/+/303
......................................................................
Patch Set 6:
(1 comment)
I fixed the buffer-overflow I introduced in the refactor in patchset 5. Only valgrind catches it, but I added a new tests-container test to verify the normalization of codesets is as expected and that has 9 new sub-tests for that verification.
Adhemerval, Would you mind having another look?
| --- locale/programs/localedef.c
| +++ locale/programs/localedef.c
| @@ -503,17 +503,11 @@ construct_output_path (char *path)
| {
| /* We found a codeset specification. Now find the end. */
| endp = ++startp;
| +
| + /* Stop at the first '@', and don't normalize anything past that. */
| while (*endp != '\0' && *endp != '@')
| ++endp;
|
| if (endp > startp)
| normal = normalize_codeset (startp, endp - startp);
PS5, Line 512:
There is a bug here I need to fix. If we normalize, then the string
length is potentially shorter or longer.
| }
| - else
| - /* This is to keep gcc quiet. */
| - endp = NULL;
| -
| - /* We put an additional '\0' at the end of the string because at
| - the end of the function we need another byte for the trailing
| - '/'. */
| - ssize_t n;
--
Gerrit-Project: glibc
Gerrit-Branch: master
Gerrit-Change-Id: I28b9f680711ff00252a2cb15625b774cc58ecb9d
Gerrit-Change-Number: 303
Gerrit-PatchSet: 6
Gerrit-Owner: Carlos O'Donell <carlos@redhat.com>
Gerrit-Reviewer: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Gerrit-Reviewer: Carlos O'Donell <carlos@redhat.com>
Gerrit-Reviewer: Florian Weimer <fweimer@redhat.com>
Gerrit-CC: Simon Marchi <simon.marchi@polymtl.ca>
Gerrit-Comment-Date: Thu, 19 Dec 2019 04:37:37 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment