Comment 25 for bug 1183580

Revision history for this message
Dave Gilbert (ubuntu-treblig) wrote : Re: librcc segfaults on latest saucy

On current trusty (i.e. hasn't changed much) it still does it:

(gdb) where
#0 __strcmp_sse2 () at ../sysdeps/x86_64/multiarch/../strcmp.S:212
#1 0x00007faafc8a320a in rccGetDefaultLanguage (ctx=0x198d700) at lng.c:115

        for (i=0;ctx->languages[i];i++) {
115 if (!strcmp(ctx->languages[i]->sn, stmp)) {
(gdb) p stmp
$1 = "en\000\000\000\000\000\000\200ޘ\001\000\000\000\000\001"
(gdb) p ctx
$2 = (rcc_context) 0x198d700
(gdb) p ctx->languages[0]
$3 = (rcc_language_ptr) 0x198dfc8
(gdb) p ctx->languages[0]->sn
$4 = 0x0

so seems to be a relatively simple case of landing a NULL into a strcmp.