| [ Return to Bugs & Features | Roadmap 1.1 | SVN ⇄ GIT ]
STR #263
Application: | FLTK Library |
Status: | 1 - Closed w/Resolution |
Priority: | 4 - High, e.g. key functionality not working |
Scope: | 2 - Specific to an operating system |
Subsystem: | WIN32 |
Summary: | scandir win32 bug memory overrun |
Version: | 1.1.4 |
Created By: | fabien.onepost |
Assigned To: | mike |
Fix Version: | 1.1.5rc1 |
Update Notification: | |
Trouble Report Files:
No files
Trouble Report Comments:
|
#1 | fabien.onepost 06:14 Jan 27, 2004 |
| SYMPTOM: memory overrun char array written beyond its size.
SOLUTION: In file: scandir_win32.c replace-> selectDir=(struct dirent*)malloc(sizeof(struct dirent)+strlen(find.cFileName)+1); by -> selectDir=(struct dirent*)malloc(sizeof(struct dirent)+strlen(find.cFileName)+2);
EXPLAIN: This happens when then following condition is met: if (find.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) { // Append a trailing slash to directory names... strcat(selectDir->d_name, "/");
because we concatenate a slash we need one more char ....
| |
|
#2 | mike 19:02 Feb 25, 2004 |
| Fixed in CVS - the anonymous CVS repository will be updated at midnight PST. | |
[ Return to Bugs & Features ]
|
| |