fatal crash when loading files with path length > 256


(maxim) #1

We found a fatal crash bug in latest fmod 4.44.59 when loading a file with a path length > 256, for example:

/Users/TB/test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test----.mp3

fmod crashes with BAD ACCESS VIOLATION

tested on Mac OS X 10.11
fmod 4.44.59

This issue is not present in the previous fmod version… Could you please provide a quick fix for this fatal bug? Thank you very much.

Best regards,
Maxim


(Brett Paterson) #2

I’m unable to reproduce this, and file name operations are clamped to a maximum length from what I can see, what function are you using to pass the name and with what flags?


(maxim) #3

Just take the playsound example and put the filename into the loaded string. It doesn’t matter if it exists or not. It always crashes.

I went back to the former fmodex and there is not a restriction to 256 characters but to 348.
I’d expect a proper error code here, not a crash.


(Brett Paterson) #4

Thanks, it doesnt happen on windows, but I can see the strings are clamped, but not terminated with a \0 to avoid it spilling past the end. FMOD Studio is fully sanitized for this issue it seems but FMOD Ex isnt. For now terminate the last char at 255 with \0, and we’ll patch it for the next release.
regards,


(Andrew Scott) #5

Will be fixed in 4.44.61