Skip to content

Commit

Permalink
Fix hypo_set_indexname
Browse files Browse the repository at this point in the history
  • Loading branch information
rjuju committed Jun 24, 2015
1 parent 84dadaf commit be1babe
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion hypopg.c
Original file line number Diff line number Diff line change
Expand Up @@ -962,7 +962,8 @@ hypo_set_indexname(hypoEntry *entry, char *indexname)
totalsize = NAMEDATALEN;

/* eventually truncate the given indexname at NAMEDATALEN-1 if needed */
strncpy(entry->indexname, strcat(oid, indexname), totalsize - 1);
strncpy(entry->indexname, oid, strlen(oid));
strncat(entry->indexname, indexname, totalsize - strlen(oid) - 1);
}

/*
Expand Down

0 comments on commit be1babe

Please sign in to comment.