com php-src: fix possible buffer overrun in the errmsg string: ext/interbase/interbase.c
| From: | Anatol Belski | Date: | Tue, 12 Jan 2016 09:17:32 +0000 |
| Subject: | com php-src: fix possible buffer overrun in the errmsg string: ext/interbase/interbase.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-90611@lists.php.net to get a copy of this message | ||
Commit: 8e7c469f8247c02196fc366f6023231d276b2319
Author: Anatol Belski <ab@php.net> Tue, 12 Jan 2016 10:17:32 +0100
Parents: b54739e68d7677f9e295e8316ef3958500f11cac
Branches: PHP-7.0 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=8e7c469f8247c02196fc366f6023231d276b2319
Log:
fix possible buffer overrun in the errmsg string
Changed paths:
M ext/interbase/interbase.c
Diff:
diff --git a/ext/interbase/interbase.c b/ext/interbase/interbase.c
index 21a0243..3dfdac3 100644
--- a/ext/interbase/interbase.c
+++ b/ext/interbase/interbase.c
@@ -512,7 +512,7 @@ void _php_ibase_error(void) /* {{{ */
IBG(sql_code) = isc_sqlcode(IB_STATUS);
- while ((s - IBG(errmsg)) < MAX_ERRMSG - (IBASE_MSGSIZE + 2) && fb_interpret(s,
MAX_ERRMSG, &statusp)) {
+ while ((s - IBG(errmsg)) < MAX_ERRMSG - (IBASE_MSGSIZE + 2) && fb_interpret(s,
MAX_ERRMSG - strlen(IBG(errmsg)) - 1, &statusp)) {
strcat(IBG(errmsg), " ");
s = IBG(errmsg) + strlen(IBG(errmsg));
}