strmake_buf(X,Y) helper, equivalent to strmake(X,Y,sizeof(X)-1)

with a bit of lame protection against abuse.
This commit is contained in:
Sergei Golubchik 2013-04-17 19:42:34 +02:00
commit 07315d3603
27 changed files with 102 additions and 121 deletions

View file

@ -3304,7 +3304,7 @@ static LSN parse_checkpoint_record(LSN lsn)
first_log_write_lsn= lsn_korr(ptr);
ptr+= LSN_STORE_SIZE;
name_len= strlen((char *)ptr) + 1;
strmake(name, (char *)ptr, sizeof(name)-1);
strmake_buf(name, (char *)ptr);
ptr+= name_len;
if (new_table(sid, name, first_log_write_lsn))
return LSN_ERROR;