Probable off by one buffer overflow in .../xorgconfig/xorgconfig.c
X.Org Bug #11858 <http://bugs.freedesktop.org/show_bug.cgi?id=11858> Patch #11005 <http://bugs.freedesktop.org/attachment.cgi?id=11005>
This commit is contained in:
committed by
Alan Coopersmith
parent
e717eb82dc
commit
f6aa2200f2
@@ -2442,7 +2442,7 @@ write_fontpath_section(FILE *f)
|
|||||||
len = nextdir - thisdir;
|
len = nextdir - thisdir;
|
||||||
nextdir++;
|
nextdir++;
|
||||||
}
|
}
|
||||||
if (len > sizeof(cur))
|
if (len >= sizeof(cur))
|
||||||
continue;
|
continue;
|
||||||
strncpy(cur, thisdir, len);
|
strncpy(cur, thisdir, len);
|
||||||
cur[len] = '\0';
|
cur[len] = '\0';
|
||||||
|
|||||||
Reference in New Issue
Block a user