changeset 417:9a8fd1e3c51c

Attempt to fix http://osvdb.org/displayvuln.php?osvdb_id=22956 Tiny C Compiler contains a flaw that may have security implications on programs compiled with it. The compiler fails to return unsigned values for the sizeof() macro, resulting in a potential integer overflows in the objects it compiles. (I.E. -1>sizeof(int) is false if signed, true if unsigned.)
author Rob Landley <rob@landley.net>
date Wed, 21 Feb 2007 13:14:27 -0500
parents 1cfaa15e4b84
children 60ea6ef39c6f
files tcc.c
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/tcc.c	Wed Feb 21 13:12:49 2007 -0500
+++ b/tcc.c	Wed Feb 21 13:14:27 2007 -0500
@@ -7351,6 +7351,7 @@
         } else {
             vpushi(align);
         }
+        vtop->type.t |= VT_UNSIGNED;
         break;
 
     case TOK_builtin_types_compatible_p: