Ethereal-cvs: [Ethereal-cvs] r11382 - in trunk/epan: dfilter ftypes: trunk/epan/ftypes/ftype-i

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

Date: Fri, 16 Jul 2004 18:35:47 -0500 (CDT)
Author: guy
Date: Fri Jul 16 18:35:46 2004
New Revision: 11382

Modified:
   trunk/epan/dfilter/scanner.l
   trunk/epan/ftypes/ftype-integer.c
Log:
I'm not sure "strtol()" and "strtoul()" are guaranteed to clear "errno"
on success, so we clear it before calling them.

Assign the value of "strtol()" to a "long" and assign the value of
"strtoul()" to an "unsigned long", as those are the return types for
those functions - "gint32" and "guint32" might not be large enough for
the return value on an LP64 platform.

Check for errno being EINVAL, as that can happen if the number isn't
valid.

Before assigning the value returned by "strtol()" or "strtoul()" to the
final destination, check whether it's in the right range for that
destination.