shithub: sl

Download patch

ref: 799a883deb19508113d8531bc0cf7f5f325bb7ef
parent: ed1b3e1835f90a829efda23d77117a8f7c3295b0
author: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se>
date: Mon Apr 21 05:48:52 EDT 2025

ios_vprintf: fix a ridiculous mistake (sizeof on an int)

--- a/src/ios.c
+++ b/src/ios.c
@@ -965,7 +965,7 @@
 		return vdprintf(s->fd, format, args);
 	}else{
 		str = MEM_ALLOC(c+1);
-		c = vsnprintf(str, sizeof(c+1), format, args);
+		c = vsnprintf(str, c+1, format, args);
 	}
 	if(c > 0)
 		c = ios_write(s, str, c);