7cd341218d
versions. Use BSD's bsd.lib.mk to build uclmmbase and avoid building (most of the) functionality, that is present in our base libraries (btree, md5, etc.) In vic stop using PERL, use Tcl/Tk-8.4, respect CC and CFLAGS and some other improvements. vic is thus unbroken on 5.x Per fenner's (much) earlier e-mail, grab maintainership for the time being. PR: ports/75066 (obsoleted) Approved by: fenner (implicitly)
25 lines
602 B
Text
25 lines
602 B
Text
--- src/mbus_parser.c Thu Jan 23 17:39:55 2003
|
|
+++ src/mbus_parser.c Thu Jan 23 17:41:26 2003
|
|
@@ -158,6 +158,7 @@
|
|
int mbus_parse_int(struct mbus_parser *m, int *i)
|
|
{
|
|
char *p;
|
|
+ long l;
|
|
|
|
assert(m->magic == MBUS_PARSER_MAGIC);
|
|
|
|
@@ -166,11 +167,12 @@
|
|
CHECK_OVERRUN;
|
|
}
|
|
|
|
- *i = strtol(m->buffer, &p, 10);
|
|
- if (((*i == LONG_MAX) || (*i == LONG_MIN)) && (errno == ERANGE)) {
|
|
+ l = strtol(m->buffer, &p, 10);
|
|
+ if (((l >= INT_MAX) || (l <= INT_MIN)) && (errno == ERANGE)) {
|
|
debug_msg("integer out of range\n");
|
|
return FALSE;
|
|
}
|
|
+ *i = l;
|
|
|
|
if (p == m->buffer) {
|
|
return FALSE;
|