From a714989094a67315d17642e142c62a2e5abebb7e Mon Sep 17 00:00:00 2001 From: Joshua Haberman Date: Tue, 3 Mar 2009 22:20:57 -0800 Subject: Detect overflow (unlikely except for malicious input). --- pbstream.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'pbstream.h') 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 -- cgit v1.2.3