HCoop
/
bpt
/
guile.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
16f0612
)
Fix buffer over-read in port encoding scan.
author
Julian Graham
<julian.graham@aya.yale.edu>
Fri, 12 Nov 2010 13:45:09 +0000
(08:45 -0500)
committer
Julian Graham
<julian.graham@aya.yale.edu>
Fri, 12 Nov 2010 13:45:09 +0000
(08:45 -0500)
* libguile/read.c (scm_i_scan_for_encoding): Add a NULL terminator to the
end of header to prevent over-read by subsequent call to strstr.
libguile/read.c
patch
|
blob
|
blame
|
history
diff --git
a/libguile/read.c
b/libguile/read.c
index
609285c
..
07a4ffd
100644
(file)
--- a/
libguile/read.c
+++ b/
libguile/read.c
@@
-1646,6
+1646,7
@@
scm_i_scan_for_encoding (SCM port)
return NULL;
bytes_read = scm_c_read (port, header, SCM_ENCODING_SEARCH_SIZE);
+ header[bytes_read] = NULL;
scm_seek (port, scm_from_int (0), scm_from_int (SEEK_SET));