mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-27 22:39:43 +03:00
Replace strncpy with strlcpy, as strncpy is not guaranteed to be
NULL-terminated. (thx Colin Wenzel) svn path=/trunk/netsurf/; revision=13881
This commit is contained in:
parent
692f223d3a
commit
b4977fbdcc
@ -867,13 +867,13 @@ int main(int argc, char** argv)
|
||||
|
||||
ami_gui_splash_close(splash_window);
|
||||
|
||||
strncpy(script, nsoption_charp(arexx_dir), 1024);
|
||||
strlcpy(script, nsoption_charp(arexx_dir), 1024);
|
||||
AddPart(script, nsoption_charp(arexx_startup), 1024);
|
||||
ami_arexx_execute(script);
|
||||
|
||||
netsurf_main_loop();
|
||||
|
||||
strncpy(script, nsoption_charp(arexx_dir), 1024);
|
||||
strlcpy(script, nsoption_charp(arexx_dir), 1024);
|
||||
AddPart(script, nsoption_charp(arexx_shutdown), 1024);
|
||||
ami_arexx_execute(script);
|
||||
|
||||
|
@ -115,7 +115,7 @@ char *path_to_url(const char *path)
|
||||
DevNameFromLock(lock, newpath, sizeof newpath, DN_FULLPATH);
|
||||
UnLock(lock);
|
||||
}
|
||||
else strncpy(newpath, path, sizeof newpath);
|
||||
else strlcpy(newpath, path, sizeof newpath);
|
||||
|
||||
r = malloc(strlen(newpath) + SLEN("file:///") + 1);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user