mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-27612 Connect : check buffer sizes, fix string format errors
This commit is contained in:
@@ -1511,9 +1511,13 @@ bool XMLCOL::ParseXpath(PGLOBAL g, bool mode)
|
||||
if (!mode)
|
||||
// Take care of an eventual extra column node a la html
|
||||
if (Tdbp->Colname) {
|
||||
sprintf(pbuf, Tdbp->Colname, Rank + ((Tdbp->Usedom) ? 0 : 1));
|
||||
strcat(pbuf, "/");
|
||||
} // endif Colname
|
||||
char *p = strstr(Tdbp->Colname, "%d");
|
||||
if (p)
|
||||
snprintf(pbuf, len + 3, "%.*s%d%s/", (int) (p - Tdbp->Colname), Tdbp->Colname,
|
||||
Rank + (Tdbp->Usedom ? 0 : 1), p + 2);
|
||||
else
|
||||
snprintf(pbuf, len + 3, "%s/", Tdbp->Colname);
|
||||
} // endif Colname
|
||||
|
||||
if (Xname) {
|
||||
if (Type == 2) {
|
||||
|
Reference in New Issue
Block a user