bug-m4
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

undiagnosed integer overflow in parsing frozen files


From: Jim Meyering
Subject: undiagnosed integer overflow in parsing frozen files
Date: Thu, 08 May 2008 21:10:59 +0200

Hi,

I noticed that freeze.c parses integers like this:

#define GET_NUMBER(Number)                                      \
  do                                                            \
    {                                                           \
      (Number) = 0;                                             \
      while (isdigit (character))                               \
        {                                                       \
          (Number) = 10 * (Number) + character - '0';           \
          GET_CHARACTER;                                        \
        }                                                       \
    }                                                           \
  while (0)

However, given too long a string of digits, "Number" overflows.
Considering the rigorous parsing elsewhere in that file, I think
this must be accidental.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]