You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Type / to search for a string which does not occur in a file (e.g. akljahlekfahlkdjfh)
Hit N to search backwards
Segmentation fault occurs.
Backtrace:
#0 __memcmp_ssse3 () at ../sysdeps/x86_64/multiarch/memcmp-ssse3.S:1933
#1 0x0000000000402743 in editor_process_search (e=e@entry=0xfc5010, str=<optimized out>, str@entry=0xfc511c "asdfklj", dir=dir@entry=SEARCH_BACKWARD) at editor.c:740
#2 0x0000000000402e92 in editor_process_keypress (e=0xfc5010) at editor.c:923
#3 0x00000000004012de in main (argc=0x2, argv=<optimized out>) at hx.c:177
The text was updated successfully, but these errors were encountered:
This happened since we are working with unsigned integers when
addressing the editor contents. The integer would wrap around to
UINT_MAX, comparing invalid memory addresses in the process. This patch
should fix that.
To reproduce:
hx
./
to search for a string which does not occur in a file (e.g.akljahlekfahlkdjfh
)N
to search backwardsBacktrace:
The text was updated successfully, but these errors were encountered: