aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2004-07-22 14:00:25 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-07 21:02:14 -0700
commit7601387b02d9798f54844858e932d2f3727811cd (patch)
treecc8683e706bccd888d40860e1e3e46e14a447340 /token.h
parentDon't allow string concatenation to overflow MAX_STRING. (diff)
downloadsparse-7601387b02d9798f54844858e932d2f3727811cd.tar.gz
sparse-7601387b02d9798f54844858e932d2f3727811cd.tar.bz2
sparse-7601387b02d9798f54844858e932d2f3727811cd.zip
C99 says strings should be up to 4095 bytes.
Also, while we're here, be more careful about the exact limits, and concatenation: we want to have the ending NUL character even when we concatenate too much.
Diffstat (limited to 'token.h')
-rw-r--r--token.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/token.h b/token.h
index 25947f0..7bb0d43 100644
--- a/token.h
+++ b/token.h
@@ -144,7 +144,7 @@ struct token {
};
};
-#define MAX_STRING 2048
+#define MAX_STRING 4095
static inline struct token *containing_token(struct token **p)
{