common: xf86Configure: alloc_strlen: Allocated memory does not have space for the terminating NUL of the string
buffer_alloc: Called allocating function "realloc" which allocated memory dictated by parameter "len + strlen(displaySize_string)" alloc_strlen: Allocated memory does not have space for the terminating NUL of the string var_assign: Assigned "ptr->mon_comment" to storage allocated by "realloc(ptr->mon_comment, len + strlen(displaySize_string))" Signed-off-by: Oliver McFadden <oliver.mcfadden@nokia.com> Reviewed-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
parent
aeae6637b5
commit
e7ff956638
|
@ -612,7 +612,7 @@ configureDDCMonitorSection (int screennum)
|
|||
len = 0;
|
||||
}
|
||||
if ((ptr->mon_comment =
|
||||
realloc(ptr->mon_comment, len+strlen(displaySize_string)))) {
|
||||
realloc(ptr->mon_comment, len + strlen(displaySize_string) + 1))) {
|
||||
strcpy(ptr->mon_comment + len, displaySize_string);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user