mirror of
https://github.com/macports/macports-ports.git
synced 2026-07-12 18:20:25 -07:00
42 lines
1.6 KiB
Diff
42 lines
1.6 KiB
Diff
Fix a double free in rz_mode when interrupting the repeat builtin.
|
|
|
|
==87167==ERROR: AddressSanitizer: attempting double-free on 0x602000001a70 in thread T0:
|
|
#0 0x10d3c5fdd in wrap_free (libclang_rt.asan_osx_dynamic.dylib:x86_64h+0x56fdd)
|
|
#1 0x10d2c52d2 in rz_mode main.c:127
|
|
#2 0x10d2c2944 in doinput doit.c:27
|
|
#3 0x10d2c4ea2 in main main.c:28
|
|
#4 0x7fff7aa96014 in start (libdyld.dylib:x86_64+0x1014)
|
|
|
|
0x602000001a70 is located 0 bytes inside of 7-byte region [0x602000001a70,0x602000001a77)
|
|
freed by thread T0 here:
|
|
#0 0x10d3c5fdd in wrap_free (libclang_rt.asan_osx_dynamic.dylib:x86_64h+0x56fdd)
|
|
#1 0x10d2c8a11 in zrun zmodem.c:86
|
|
#2 0x10d2c5259 in rz_mode main.c:123
|
|
#3 0x10d2c2944 in doinput doit.c:27
|
|
#4 0x10d2c4ea2 in main main.c:28
|
|
#5 0x7fff7aa96014 in start (libdyld.dylib:x86_64+0x1014)
|
|
|
|
previously allocated by thread T0 here:
|
|
#0 0x10d3c0952 in wrap_strdup (libclang_rt.asan_osx_dynamic.dylib:x86_64h+0x51952)
|
|
#1 0x10d2c3dee in write_vector_word globbing.c:55
|
|
#2 0x10d2c3b3c in glob_args globbing.c:35
|
|
#3 0x10d2c889f in zparse zmodem.c:60
|
|
#4 0x10d2c5240 in rz_mode main.c:121
|
|
#5 0x10d2c2944 in doinput doit.c:27
|
|
#6 0x10d2c4ea2 in main main.c:28
|
|
#7 0x7fff7aa96014 in start (libdyld.dylib:x86_64+0x1014)
|
|
|
|
SUMMARY: AddressSanitizer: double-free (libclang_rt.asan_osx_dynamic.dylib:x86_64h+0x56fdd) in wrap_free
|
|
==87167==ABORTING
|
|
|
|
--- zmodem.c.orig 2003-09-02 03:02:15.000000000 +0000
|
|
+++ zmodem.c 2018-12-28 13:40:40.000000000 +0000
|
|
@@ -84,6 +84,7 @@
|
|
if (gl_repeat && j)
|
|
{
|
|
free(av[0]);
|
|
+ av[0] = NULL;
|
|
av++;
|
|
}
|
|
j = 0;
|