From: Christophe CURIS <christophe.cu...@free.fr> As pointer by Coverity, the function wstrappend may move the string in memory (because that's what realloc does if it can't expand the allocated buffer in-place), so it is important to use the returned address and not assume the old pointer is still valid.
Signed-off-by: Christophe CURIS <christophe.cu...@free.fr> --- src/dialog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dialog.c b/src/dialog.c index 8eb01f1..6b26aef 100644 --- a/src/dialog.c +++ b/src/dialog.c @@ -275,7 +275,7 @@ ScanFiles(const char *dir, const char *prefix, unsigned acceptmask, unsigned dec de->d_name + prefixlen) == WANotFound) { suffix = wstrdup(de->d_name + prefixlen); if (sb.st_mode & S_IFDIR) - wstrappend(suffix,"/"); + suffix = wstrappend(suffix, "/"); WMAddToArray(result, suffix); } wfree(fullfilename); -- 1.9.2 -- To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.