kwo pushed a commit to branch master. http://git.enlightenment.org/e16/e16.git/commit/?id=fde462c1cae2193ba3ae74a4b46afc0f30a85409
commit fde462c1cae2193ba3ae74a4b46afc0f30a85409 Author: Kim Woelders <[email protected]> Date: Sat Mar 31 09:00:13 2018 +0200 Warning fixes for gcc 8 --- dox/text.c | 5 +++-- src/menus-misc.c | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/dox/text.c b/dox/text.c index e0e7e5e9..3681d088 100644 --- a/dox/text.c +++ b/dox/text.c @@ -1,6 +1,6 @@ /* * Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors - * Copyright (C) 2007-2011 Kim Woelders + * Copyright (C) 2007-2018 Kim Woelders * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -47,7 +47,8 @@ TextGetLines(const char *text, int *count) list = EREALLOC(char *, list, k); list[k - 1] = EMALLOC(char, j - i + 1); - strncpy(list[k - 1], &(text[i]), (j - i)); + if (j > i) + strncpy(list[k - 1], &(text[i]), (j - i)); list[k - 1][j - i] = 0; i = j; if (text[i] == '\n') diff --git a/src/menus-misc.c b/src/menus-misc.c index 3ff09a3d..0753fb68 100644 --- a/src/menus-misc.c +++ b/src/menus-misc.c @@ -1,6 +1,6 @@ /* * Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors - * Copyright (C) 2004-2017 Kim Woelders + * Copyright (C) 2004-2018 Kim Woelders * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -125,7 +125,7 @@ MenuLoadFromDirectory(Menu * m) return 1; while (fgets(s, sizeof(s), f)) { - char s2[4096]; + char s2[1024]; s[strlen(s) - 1] = 0; len = 0; --
