summaryrefslogtreecommitdiff
path: root/pbstream.h
diff options
context:
space:
mode:
authorJoshua Haberman <joshua@reverberate.org>2009-03-03 22:20:57 -0800
committerJoshua Haberman <joshua@reverberate.org>2009-03-03 22:20:57 -0800
commita714989094a67315d17642e142c62a2e5abebb7e (patch)
tree8606d8748479007961fb97688846402d1d88f0c1 /pbstream.h
parent9f56ff3b5bd4d019b8df546fdf59adecddc904bc (diff)
Detect overflow (unlikely except for malicious input).
Diffstat (limited to 'pbstream.h')
-rw-r--r--pbstream.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/pbstream.h b/pbstream.h
index 6830689..6ad6685 100644
--- a/pbstream.h
+++ b/pbstream.h
@@ -153,6 +153,9 @@ typedef enum pbstream_status {
// Input was nested more than PBSTREAM_MAX_STACK deep.
PBSTREAM_ERROR_STACK_OVERFLOW = -4,
+ // The input data caused the pb's offset (a size_t) to overflow.
+ PBSTREAM_ERROR_OVERFLOW = -5,
+
/** NONFATAL ERRORS: the input was invalid, but we can continue if desired. */
// A value was encountered that was not defined in the .proto file. The
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback