[Top][All Lists]

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

[Bug-gnulib] gnulib README patch for size_t addition overflow

From: Paul Eggert
Subject: [Bug-gnulib] gnulib README patch for size_t addition overflow
Date: 17 Nov 2003 14:05:30 -0800
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

I installed this:

2003-11-17  Paul Eggert  <address@hidden>

        * README: Mention that S+T cannot overflow if S is the size of
        an existing object and T is sufficiently small.

RCS file: /cvsroot/gnulib/gnulib/README,v
retrieving revision 1.8
retrieving revision 1.9
diff -p -u -r1.8 -r1.9
--- README      16 Oct 2003 18:28:06 -0000      1.8
+++ README      17 Nov 2003 21:47:16 -0000      1.9
@@ -130,6 +130,11 @@ as well.  GNULib code makes the followin
    for all practical hosts with flat address spaces, but it is not
    always true for hosts with segmented address spaces.
+ * If an existing object has size S, and if T is sufficiently small
+   (e.g., 8 KiB), then S + T cannot overflow.  Overflow in this case
+   would mean that the rest of your program fits into T bytes, which
+   can't happen in realistic flat-address-space hosts.
  * Objects with all bits zero are treated as 0 or NULL.  For example,
    memset (A, 0, sizeof A) initializes an array A of pointers to NULL.

reply via email to

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