fix parsing of quoted time zone names
authorHannu Nyman <hannu.nyman@iki.fi>
Mon, 24 Oct 2016 10:12:24 +0000 (13:12 +0300)
committerRich Felker <dalias@aerifal.cx>
Mon, 7 Nov 2016 16:54:09 +0000 (11:54 -0500)
Fix parsing of the < > quoted time zone names. Compare the correct
character instead of repeatedly comparing the first character.

src/time/__tz.c

index 8b84b9bd12cf9091268105357c0158357d6ab82f..0e0c4ea240f0179d3abe491406f38b75223f4a30 100644 (file)
@@ -84,7 +84,7 @@ static void getname(char *d, const char **p)
        int i;
        if (**p == '<') {
                ++*p;
-               for (i=0; **p!='>' && i<TZNAME_MAX; i++)
+               for (i=0; (*p)[i]!='>' && i<TZNAME_MAX; i++)
                        d[i] = (*p)[i];
                ++*p;
        } else {