Skip to content

Commit f3431ca

Browse files
arrowdTheAssassin
authored andcommitted
Fix bug in the snprintf() invocation
1 parent 54cc28f commit f3431ca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/appimagetool.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -952,7 +952,7 @@ main (int argc, char *argv[])
952952
if(zsyncmake_path){
953953
char buf[1024];
954954
// gh-releases-zsync|probono|AppImages|latest|Subsurface-*x86_64.AppImage.zsync
955-
int ret = snprintf(buf, "gh-releases-zsync|%s|%s|latest|%s*-%s.AppImage.zsync", github_repository_owner, github_repository_name, app_name_for_filename, arch);
955+
int ret = snprintf(buf, sizeof(buf), "gh-releases-zsync|%s|%s|latest|%s*-%s.AppImage.zsync", github_repository_owner, github_repository_name, app_name_for_filename, arch);
956956
if (ret < 0) {
957957
die("snprintf error");
958958
} else if (ret >= sizeof(buf)) {

0 commit comments

Comments
 (0)