Commit ad39faca authored by Paul Eggert's avatar Paul Eggert
Browse files

* minibuf.c (Fread_buffer): Don't assume strlen fits in int.

parent 6e5bb2dc
2011-06-20 Paul Eggert <eggert@cs.ucla.edu> 2011-06-20 Paul Eggert <eggert@cs.ucla.edu>
* minibuf.c (Fread_buffer):
* lread.c (intern, intern_c_string): * lread.c (intern, intern_c_string):
* image.c (xpm_scan) [HAVE_NS && !HAVE_XPM]: * image.c (xpm_scan) [HAVE_NS && !HAVE_XPM]:
Don't assume string length fits in int. Don't assume string length fits in int.
......
...@@ -1115,7 +1115,7 @@ function, instead of the usual behavior. */) ...@@ -1115,7 +1115,7 @@ function, instead of the usual behavior. */)
{ {
Lisp_Object args[4], result; Lisp_Object args[4], result;
char *s; char *s;
int len; ptrdiff_t len;
int count = SPECPDL_INDEX (); int count = SPECPDL_INDEX ();
if (BUFFERP (def)) if (BUFFERP (def))
...@@ -1137,7 +1137,7 @@ function, instead of the usual behavior. */) ...@@ -1137,7 +1137,7 @@ function, instead of the usual behavior. */)
if (STRINGP (prompt)) if (STRINGP (prompt))
{ {
s = SSDATA (prompt); s = SSDATA (prompt);
len = strlen (s); len = SBYTES (prompt);
if (len >= 2 && s[len - 2] == ':' && s[len - 1] == ' ') if (len >= 2 && s[len - 2] == ':' && s[len - 1] == ' ')
len = len - 2; len = len - 2;
else if (len >= 1 && (s[len - 1] == ':' || s[len - 1] == ' ')) else if (len >= 1 && (s[len - 1] == ':' || s[len - 1] == ' '))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment