aboutsummaryrefslogtreecommitdiffstats
path: root/lib-src/ChangeLog
diff options
context:
space:
mode:
authorPaul Eggert2011-08-28 16:52:34 -0700
committerPaul Eggert2011-08-28 16:52:34 -0700
commit17107bb698f82bb5b9c8a732cd6b3faaad4d7af6 (patch)
tree5a0e1fb90617fbe9eb24ae763caed03c45daf948 /lib-src/ChangeLog
parent5fc295a42feaef453b57010b826e589b9b9cb7dd (diff)
downloademacs-17107bb698f82bb5b9c8a732cd6b3faaad4d7af6.tar.gz
emacs-17107bb698f82bb5b9c8a732cd6b3faaad4d7af6.zip
Integer and memory overflow issues.
* emacsclient.c (xmalloc): Accept size_t, not unsigned int, to avoid potential buffer overflow issues on typical 64-bit hosts. Return void *, not long *. (get_current_dir_name): Report a failure, instead of looping forever, if buffer size calculation overflows. Treat malloc failures like realloc failures, as that has better behavior and is more consistent. Do not check whether xmalloc returns NULL, as that's not possible. (message): Do not arbitrarily truncate message to 2048 bytes when sending it to stderr; use vfprintf instead. (get_server_config, set_local_socket) (start_daemon_and_retry_set_socket): Do not alloca arbitrarily-large buffers; that's not safe. (get_server_config, set_local_socket): Do not use sprintf when its result might not fit in 'int'. (set_local_socket): Do not assume uid fits in 'int'.
Diffstat (limited to 'lib-src/ChangeLog')
-rw-r--r--lib-src/ChangeLog21
1 files changed, 21 insertions, 0 deletions
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog
index c878d313b70..d056b1a4b81 100644
--- a/lib-src/ChangeLog
+++ b/lib-src/ChangeLog
@@ -1,3 +1,24 @@
12011-08-28 Paul Eggert <eggert@cs.ucla.edu>
2
3 Integer and memory overflow issues.
4
5 * emacsclient.c (xmalloc): Accept size_t, not unsigned int, to
6 avoid potential buffer overflow issues on typical 64-bit hosts.
7 Return void *, not long *.
8 (get_current_dir_name): Report a failure, instead of looping
9 forever, if buffer size calculation overflows. Treat malloc
10 failures like realloc failures, as that has better behavior and is
11 more consistent. Do not check whether xmalloc returns NULL, as
12 that's not possible.
13 (message): Do not arbitrarily truncate message to 2048 bytes when
14 sending it to stderr; use vfprintf instead.
15 (get_server_config, set_local_socket)
16 (start_daemon_and_retry_set_socket): Do not alloca
17 arbitrarily-large buffers; that's not safe.
18 (get_server_config, set_local_socket): Do not use sprintf when its
19 result might not fit in 'int'.
20 (set_local_socket): Do not assume uid fits in 'int'.
21
12011-07-28 Paul Eggert <eggert@cs.ucla.edu> 222011-07-28 Paul Eggert <eggert@cs.ucla.edu>
2 23
3 Assume freestanding C89 headers, string.h, stdlib.h. 24 Assume freestanding C89 headers, string.h, stdlib.h.