From: Paul Eggert Date: Sun, 19 Jun 2011 18:30:19 +0000 (-0700) Subject: * callproc.c: Don't assume string length fits in 'int.' X-Git-Tag: emacs-pretest-24.0.90~104^2~473^2~34 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=989f33ba6bda51e06241f2e5a7b07f9feb435057;p=emacs.git * callproc.c: Don't assume string length fits in 'int.' --- diff --git a/src/ChangeLog b/src/ChangeLog index ec90bbc3325..89d518a1a56 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2011-06-19 Paul Eggert + * callproc.c (getenv_internal_1, getenv_internal) + (Fgetenv_internal): * buffer.c (init_buffer): Don't assume string length fits in 'int'. * lread.c (invalid_syntax): Omit length argument. diff --git a/src/callproc.c b/src/callproc.c index d6bad2a44e7..fae47b7a699 100644 --- a/src/callproc.c +++ b/src/callproc.c @@ -1378,8 +1378,8 @@ relocate_fd (int fd, int minfd) #endif /* not WINDOWSNT */ static int -getenv_internal_1 (const char *var, int varlen, char **value, int *valuelen, - Lisp_Object env) +getenv_internal_1 (const char *var, ptrdiff_t varlen, char **value, + ptrdiff_t *valuelen, Lisp_Object env) { for (; CONSP (env); env = XCDR (env)) { @@ -1413,8 +1413,8 @@ getenv_internal_1 (const char *var, int varlen, char **value, int *valuelen, } static int -getenv_internal (const char *var, int varlen, char **value, int *valuelen, - Lisp_Object frame) +getenv_internal (const char *var, ptrdiff_t varlen, char **value, + ptrdiff_t *valuelen, Lisp_Object frame) { /* Try to find VAR in Vprocess_environment first. */ if (getenv_internal_1 (var, varlen, value, valuelen, @@ -1454,7 +1454,7 @@ If optional parameter ENV is a list, then search this list instead of (Lisp_Object variable, Lisp_Object env) { char *value; - int valuelen; + ptrdiff_t valuelen; CHECK_STRING (variable); if (CONSP (env))