mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 835029 - Fix off-by-one error in readlink call. r=briansmith
This commit is contained in:
parent
c30a39b01e
commit
676fc480e0
@ -511,7 +511,7 @@ bool ModuleInfoCallback(const ModuleInfo &module_info, void *context) {
|
||||
int count;
|
||||
|
||||
snprintf(path, sizeof (path), "/proc/self/path/%s", module_info.name);
|
||||
if ((count = readlink(path, buf, PATH_MAX)) < 0)
|
||||
if ((count = readlink(path, buf, PATH_MAX - 1)) < 0)
|
||||
return false;
|
||||
buf[count] = '\0';
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user