]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.0405: tests: xxd buffer overflow fails on 32-bit v9.1.0405
authorChristian Brabandt <cb@256bit.org>
Fri, 10 May 2024 18:00:33 +0000 (20:00 +0200)
committerChristian Brabandt <cb@256bit.org>
Fri, 10 May 2024 18:03:21 +0000 (20:03 +0200)
Problem:  tests: xxd buffer overflow fails on 32-bit
Solution: Skip test on 32-bit architecture

Signed-off-by: Christian Brabandt <cb@256bit.org>
src/testdir/test_xxd.vim
src/version.c

index 642f5e709ee081a6414cd7177f37cca0e6134c28..a91a1fcf921afeee26aae8e2b5ce571fd7e76141 100644 (file)
@@ -412,9 +412,12 @@ func Test_xxd_max_cols()
 endfunc
 
 
-" Try to trigger a buffer overflow (#14738)
+" This used to trigger a buffer overflow (#14738)
 func Test_xxd_buffer_overflow()
   CheckUnix
+  if system('file ' .. s:xxd_cmd) =~ '32-bit'
+    throw 'Skipped: test only works on 64-bit architecture'
+  endif
   new
   let input = repeat('A', 256)
   call writefile(['-9223372036854775808: ' . repeat("\e[1;32m41\e[0m ", 256) . ' ' . repeat("\e[1;32mA\e[0m", 256)], 'Xxdexpected', 'D')
index 6bb8be6f4e1bf95c5ae0992c15379b66c0bf8948..cbd29097d8aba5560415145bbf258fbf0d0f674d 100644 (file)
@@ -704,6 +704,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    405,
 /**/
     404,
 /**/