[PATCH 6/6] httpd_post_upload.cgi: use mktemp to avoid $RANDOM

Sergey Ponomarev stokito at gmail.com
Sat Jan 9 21:09:51 UTC 2021


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

Signed-off-by: Sergey Ponomarev <stokito at 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



More information about the busybox mailing list