projects
/
monky
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
* Replacing strdup() with strndup() throughout
[monky]
/
src
/
smapi.c
diff --git
a/src/smapi.c
b/src/smapi.c
index
e534e3f
..
0a10bae
100644
(file)
--- a/
src/smapi.c
+++ b/
src/smapi.c
@@
-50,7
+50,7
@@
char *smapi_read_str(const char *path)
fscanf(fp, "%255s\n", str);
fclose(fp);
}
- return strdup(str);
+ return strndup(str, text_buffer_size);
}
int smapi_read_int(const char *path)