mirror of
https://github.com/php/php-src.git
synced 2024-09-24 03:17:26 +00:00
fix possible buffer overrun in the errmsg string
This commit is contained in:
parent
b54739e68d
commit
8e7c469f82
@ -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));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user