[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    [PATCH 6/6] httpd_post_upload.cgi: use mktemp to avoid $RANDOM
From:       Sergey Ponomarev <stokito () gmail ! com>
Date:       2021-01-09 21:09:51
Message-ID: 20210109210951.200757-7-stokito () gmail ! com
[Download RAW message or body]

The $RANDOM variable may be disabled on ash compilation but we can safelly use mktemp instead.

Signed-off-by: Sergey Ponomarev <stokito@gmail.com>
---
 networking/httpd_post_upload.cgi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/networking/httpd_post_upload.cgi b/networking/httpd_post_upload.cgi
index e4ffd2bb5..538f7181b 100755
--- a/networking/httpd_post_upload.cgi
+++ b/networking/httpd_post_upload.cgi
@@ -18,7 +18,7 @@
 # ^M    <--------- extra empty line
 # -----------------------------29995809218093749221856446032--^M
 
-file=/tmp/$$-$RANDOM
+file=$(mktemp)
 
 CR=`printf '\r'`
 
-- 
2.27.0

_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic