Commit ad39faca authored by Paul Eggert's avatar Paul Eggert

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

parent 6e5bb2dc
2011-06-20 Paul Eggert <eggert@cs.ucla.edu>
* minibuf.c (Fread_buffer):
* lread.c (intern, intern_c_string):
* image.c (xpm_scan) [HAVE_NS && !HAVE_XPM]:
Don't assume string length fits in int.
......
......@@ -1115,7 +1115,7 @@ function, instead of the usual behavior. */)
{
Lisp_Object args[4], result;
char *s;
int len;
ptrdiff_t len;
int count = SPECPDL_INDEX ();
if (BUFFERP (def))
......@@ -1137,7 +1137,7 @@ function, instead of the usual behavior. */)
if (STRINGP (prompt))
{
s = SSDATA (prompt);
len = strlen (s);
len = SBYTES (prompt);
if (len >= 2 && s[len - 2] == ':' && s[len - 1] == ' ')
len = len - 2;
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