mirror of
https://github.com/dvorka/hstr.git
synced 2024-12-26 17:33:50 +08:00
fix stack overflow read
This commit is contained in:
parent
5ebf10a42c
commit
1ffe76b5f3
1 changed files with 2 additions and 1 deletions
|
@ -1273,7 +1273,8 @@ void loop_to_select(void)
|
|||
pattern[0]=0;
|
||||
// TODO this is too late! > don't render twice
|
||||
// TODO overflow
|
||||
strcpy(pattern, hstr->cmdline);
|
||||
strncpy(pattern, hstr->cmdline, SELECTION_PREFIX_MAX_LNG-1);
|
||||
pattern[SELECTION_PREFIX_MAX_LNG-1]=0;
|
||||
|
||||
while (!done) {
|
||||
maxHistoryItems=recalculate_max_history_items();
|
||||
|
|
Loading…
Reference in a new issue