summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Ball <nullspoon@oper.io>2021-08-18 10:43:26 -0600
committerAaron Ball <nullspoon@oper.io>2021-08-18 10:43:26 -0600
commit2228b04e946babd30bd27f1241e6aa12ed68048c (patch)
tree0769824bfe9f9e92af6823f1e92692f7bcad28c3
parent0605be50cc52f729746421245b6eda7f32bf8cce (diff)
downloadnoteless-2228b04e946babd30bd27f1241e6aa12ed68048c.tar.gz
noteless-2228b04e946babd30bd27f1241e6aa12ed68048c.tar.xz
note_list: fix compilation warnings
Possible buffer overflow with sprintf and fullpath.
-rw-r--r--src/note_list.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/note_list.c b/src/note_list.c
index f043866..61a303c 100644
--- a/src/note_list.c
+++ b/src/note_list.c
@@ -50,7 +50,7 @@ void note_list_free(note_list* list) {
note* note_list_read(note_list* list) {
struct dirent* de;
- char fullpath[256];
+ char fullpath[512];
char fext[64];
// Iterrate over dir entities
@@ -146,7 +146,7 @@ int note_list_edit(note_list* list, char* editor, char* term) {
*/
int note_list_create_note(note_list* list, char* editor, char* name) {
char fullname[128];
- char fullpath[256];
+ char fullpath[512];
note* n;
// Create full file name

Generated by cgit