projects
/
sxemacs
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8a74685
)
Fix potential usage of negative file handle
author
Nelson Ferreira
<nelson.ferreira@ieee.org>
Wed, 14 Sep 2011 10:10:40 +0000
(06:10 -0400)
committer
Nelson Ferreira
<nelson.ferreira@ieee.org>
Wed, 14 Sep 2011 10:10:40 +0000
(06:10 -0400)
CID:119
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
src/lstream.c
patch
|
blob
|
history
diff --git
a/src/lstream.c
b/src/lstream.c
index
5152924
..
049f0d3
100644
(file)
--- a/
src/lstream.c
+++ b/
src/lstream.c
@@
-986,6
+986,8
@@
make_filedesc_stream_1(int filedesc, int offset, int count, int flags,
const char *mode)
{
Lisp_Object obj;
+ if (filedesc < 0)
+ return obj;
lstream_t lstr = Lstream_new(lstream_filedesc, mode);
filedesc_stream_t fstr = FILEDESC_STREAM_DATA(lstr);