mirror of
https://github.com/HypoPG/hypopg
synced 2026-05-24 09:38:21 +00:00
Fix an off-by-1 error in the buffer used to print index oid.
Thanks to github user sylph520 for the report.
This commit is contained in:
parent
460502943d
commit
bd45b0219e
1 changed files with 4 additions and 2 deletions
|
|
@ -1789,8 +1789,10 @@ hypo_hideIndexes(RelOptInfo *rel)
|
|||
static void
|
||||
hypo_set_indexname(hypoIndex * entry, char *indexname)
|
||||
{
|
||||
char oid[12]; /* store <oid>, oid shouldn't be more than
|
||||
* 9999999999 */
|
||||
char oid[13]; /* store <oid>, oid is an unsigned int32, so it
|
||||
* shouldn't be more than 4B, so 10 digits.
|
||||
* We add 2 chars for the < and > separators
|
||||
* and an extra null char.*/
|
||||
int totalsize;
|
||||
|
||||
snprintf(oid, sizeof(oid), "<%d>", entry->oid);
|
||||
|
|
|
|||
Loading…
Reference in a new issue