Index: chrome/installer/mac/third_party/bsdiff/goobspatch.c |
diff --git a/chrome/installer/mac/third_party/bsdiff/goobspatch.c b/chrome/installer/mac/third_party/bsdiff/goobspatch.c |
index 418f666200735b203e837e29e0d24b4ea887094d..6d7bff4cd8c90fab4a626a978ac19d455f9b1560 100644 |
--- a/chrome/installer/mac/third_party/bsdiff/goobspatch.c |
+++ b/chrome/installer/mac/third_party/bsdiff/goobspatch.c |
@@ -3,7 +3,7 @@ |
* All rights reserved |
* |
* Redistribution and use in source and binary forms, with or without |
- * modification, are permitted providing that the following conditions |
+ * modification, are permitted providing that the following conditions |
* are met: |
* 1. Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
@@ -470,6 +470,10 @@ int main(int argc,char * argv[]) |
}; |
/* Sanity-check */ |
+ if((ctrl[0]<0) || (ctrl[1]<0)) |
+ errx(1,"corrupt patch (diff): negative chunk size"); |
+ |
+ /* Sanity-check */ |
if(newpos+ctrl[0]>newsize) |
errx(1,"corrupt patch (diff): overrun"); |