Commit b7a2dfb2 authored by Chris Allegretta's avatar Chris Allegretta
Browse files

2013-01-13 Chris Allegretta <chrisa@asty.org>

        * src/utils.c (parse_num): Initalize errno before calling strtol().  Fixes issue
          where trying to go to a line number too long will break legitimate goto-lines
          for the remainder of the editing session, reported by Joshua Rogers.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4563 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
parent f4e26d17
Showing with 10 additions and 1 deletion
+10 -1
2013-01-02 Mike Frysinger <vapier@gentoo.org>
2013-01-13 Chris Allegretta <chrisa@asty.org>
* src/utils.c (parse_num): Initalize errno before calling strtol(). Fixes issue
where trying to go to a line number too long will break legitimate goto-lines
for the remainder of the editing session, reported by Joshua Rogers.
2013-01-09 Mike Frysinger <vapier@gentoo.org>
* configure.ac: Check for ncursesw5-config and base $CPPFLAGS based on it.
2013-01-09 Fabian Groffen <grobian@Savannah>
......
......@@ -72,6 +72,10 @@ bool parse_num(const char *str, ssize_t *val)
assert(str != NULL);
/* Man page for strtol() says this is required, and
it looks like it is! */
errno = 0;
j = (ssize_t)strtol(str, &first_error, 10);
if (errno == ERANGE || *str == '\0' || *first_error != '\0')
......
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