diff src/testdir/test_xxd.vim @ 35153:b2ea090aea59 v9.1.0405

patch 9.1.0405: tests: xxd buffer overflow fails on 32-bit Commit: https://github.com/vim/vim/commit/b7deb1b69e0841cf7b7f22f57e512f17aa6c5f6c Author: Christian Brabandt <cb@256bit.org> Date: Fri May 10 20:00:33 2024 +0200 patch 9.1.0405: tests: xxd buffer overflow fails on 32-bit Problem: tests: xxd buffer overflow fails on 32-bit Solution: Skip test on 32-bit architecture Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Fri, 10 May 2024 20:15:02 +0200
parents 42f061099b39
children
line wrap: on
line diff
--- a/src/testdir/test_xxd.vim
+++ b/src/testdir/test_xxd.vim
@@ -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')