Skip to content
Snippets Groups Projects
Commit be39e981 authored by Daniel Salzman's avatar Daniel Salzman
Browse files

tap: replace sprintf with snprintf

parent 990b7c83
No related branches found
No related tags found
No related merge requests found
......@@ -609,7 +609,7 @@ test_tmpdir(void)
build = ".";
length = strlen(build) + strlen("/tmp") + 1;
path = bmalloc(length);
sprintf(path, "%s/tmp", build);
snprintf(path, length, "%s/tmp", build);
if (access(path, X_OK) < 0)
if (mkdir(path, 0777) < 0)
sysbail("error creating temporary directory %s", path);
......
......@@ -609,7 +609,7 @@ test_tmpdir(void)
build = ".";
length = strlen(build) + strlen("/tmp") + 1;
path = bmalloc(length);
sprintf(path, "%s/tmp", build);
snprintf(path, length, "%s/tmp", build);
if (access(path, X_OK) < 0)
if (mkdir(path, 0777) < 0)
sysbail("error creating temporary directory %s", path);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment