summarylogtreecommitdiffstats
path: root/0005-memcpy-fix.patch
blob: 3bbf27c2170e09dad3348e2d6c127587f2871cc4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
diff -Naur a/src/psaux/psobjs.c b/src/psaux/psobjs.c
--- a/src/psaux/psobjs.c	2014-11-25 02:48:48.000000000 -0500
+++ b/src/psaux/psobjs.c	2015-04-21 18:31:03.106092062 -0400
@@ -182,6 +182,11 @@
       return FT_THROW( Invalid_Argument );
     }
 
+    if ( length < 0 ) {
+      FT_ERROR(( "ps_table_add: invalid length\n" ));
+      return PSaux_Err_Invalid_Argument;
+    }
+
     /* grow the base block if needed */
     if ( table->cursor + length > table->capacity )
     {