VUL: fix some possible buffer overruns

This commit is contained in:
Jay Sorg
2013-09-10 16:00:30 -07:00
parent 4e58a5a3c0
commit 39ed446e15
5 changed files with 156 additions and 6 deletions
+3
View File
@@ -55,6 +55,9 @@ struct stream
/******************************************************************************/
#define s_check_rem(s, n) ((s)->p + (n) <= (s)->end)
/******************************************************************************/
#define s_check_rem_out(s, n) ((s)->p + (n) <= (s)->data + (s)->size)
/******************************************************************************/
#define s_check_end(s) ((s)->p == (s)->end)