[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #51841] find buffer-overflow with -printf '%T+'

From: Bernhard Voelker
Subject: [bug #51841] find buffer-overflow with -printf '%T+'
Date: Thu, 7 Sep 2017 16:43:26 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0

Follow-up Comment #7, bug #51841 (project findutils):

Hmm, but this would change the time zone for all tests.
This works for me:

index 4d0fd28..a1e83de 100644
--- a/find/testsuite/find.gnu/printf.exp
+++ b/find/testsuite/find.gnu/printf.exp
@@ -3,5 +3,6 @@ exec mkdir tmp
 exec touch tmp/file
 exec chmod 600 tmp/file
 exec touch -d 1990-06-22T12:00Z tmp/file
+set env(TZ) "UTC"
 find_start p {tmp -type f -printf "a %d\n" -printf "b %f\n" -printf "c %h\n"
-printf "d %H\n" -printf "e %l\n" -printf "f %m\n" -printf "g %n\n" -printf "h
%p\n" -printf "i %P\n" -printf "j %y\n" -printf "k %Y\n" -printf "percent
it%%works%%\n" -printf "string-right !%10p!\n" -printf "string-left !%-10p!\n"
-printf "trunc-R !%10.6p!\n" -printf "trunc-L !%-10.6p!\n" -printf "a5
!%5d!\n" -printf "a05 !%05d!\n" -printf "a+ %+d\n" -printf "l1 %T+ %T@ TH=%TH
TI=%TI TM=%TM TT=%TT Td=%Td TD=%TD Tj=%Tj Tm=%Tm TU=%TU Tw=%Tw TW=%TW Ty=%Ty
TY=%TY\n"  -printf "l2 M=%M\n" -printf "l3 t=%t\n" -printf "l4 y=%y Y=%Y\n" }
 exec rm -rf tmp

Doesn't it for you as well?


Reply to this item at:


  Message sent via/by Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]