Select Open, click on empty area on a dialog (next to exist image). Tux will close immediately.
Logged In: YES
I'm not seeing this in what's in CVS (what will become Tux Paint 0.9.18). Note, however, that the Open dialog has been changed. It no longer shows Starter images. Any chance you can test the CVS version to see if the issue still occurs for you? Thanks
Logged In: YES
I tested version from cvs. Bug still on.
After choose non-exist image, select Open at bottom. Then tux will crash. Sometimes need try do several times.
13548 / Figure out filename: /
13550 snprintf(fname, sizeof(fname), "%s/%s%s",
13551 dirname[d_places[which]], d_names[which], d_exts[which]);
13553 img = myIMG_Load(fname);
'which' have values 0-15 (depend on selected box) but it does not check if this image exists. d_places have size equal count of files in directory. So 'which' can be larger then size of s_places and d_places[which] make overflow. Program crash at line 13550/13551.
d_places (d_names and d_exts) is length 'num_files_in_dir'. But (check which < num_files_in_dir) does not help. d_places is not clean after malloc. d_places[i] is only set for valid images, not for thumbnails, so it have some trash in line 13551. This make overflow with dirname[d_places[which]].
I hope you can understand me and will fix this bug.
Ah, thanks so much - I understand the bug now, and thanks for looking into the code! I'll fix this ASAP, and it will be in 0.9.18.
Fixed in CVS and fix will be in 0.9.18. Thanks!
(Note: Erase button had the same bug, and was fixed by the same correction.)
Log in to post a comment.