devilhorns pushed a commit to branch master.
commit 6e49578cb779a26a8bebb61402facf99c1aa5341
Author: Chris Michael <[email protected]>
Date: Mon Jul 8 14:38:54 2013 +0100
Check for valid string before trying to write (potentially NULL) to
the pipe.
NB: Fixes Coverity CID1039398
Signed-off-by: Chris Michael <[email protected]>
---
src/modules/emotion/generic/emotion_generic.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/modules/emotion/generic/emotion_generic.c
b/src/modules/emotion/generic/emotion_generic.c
index 5706511..1819f53 100644
--- a/src/modules/emotion/generic/emotion_generic.c
+++ b/src/modules/emotion/generic/emotion_generic.c
@@ -108,7 +108,9 @@ _player_send_str(Emotion_Generic_Video *ev, const char
*str, Eina_Bool stringsha
len = str ? eina_stringshare_strlen(str) + 1 : 0;
else
len = str ? strlen(str) + 1 : 0;
- ecore_pipe_write(ev->fd_write, str, len);
+
+ if (str)
+ ecore_pipe_write(ev->fd_write, str, len);
}
static Eina_Bool
--
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:
Build for Windows Store.
http://p.sf.net/sfu/windows-dev2dev