-
Notifications
You must be signed in to change notification settings - Fork 238
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
-maxsize no bigger than 2.14748e+09 in [soundfiler] on windows #380
Comments
in soundfiler_read (d_soundfile.c) maxsize is declared as
I think maxsize should really be a EDIT: actually, on Windows you can't even resize an array to a size larger than 2^31 because array_resize takes an |
I see this is related, huh? #366 |
it's related in the sense that users usually do "-maxsize HUGENUMBER" to circumvent the small default maxsize. Miller already said he is willing to remove the default value which is a relict from the old times. nevertheless, there should be a check in soundfiler_read to prevent integer overflow. |
can be closed |
hi, what changed? |
I mean, I see it has a new maximum of 0x7fffffff - but can you really resize it with the -maxsize flag to something bigger than 2.14748e+09? just wanna be sure |
no, because the point is to limit maxsize to LONG_MAX to avoid overflow (where the number wraps around). Miller has already merged my fix. |
yeah, I meant if it's safe to set "-maxsize" to some very large number bigger than 2.14748e+09 (say 4e+09). if I get this correctly, now it's not, because it's clipped to 2.14748e+09? sorry, I don't get it... and no details have been documented about this |
what do you mean? you can't really resize to sizes larger than LONG_MAX because Pd's internal resize function takes a long... the problem is rather that in Windows, the problem is, |
so again, "-maxsize HUGENUMBER" is perfectly safe now, it will simply set maxsize to the actual limit Pd can handle. |
ok, thanks for the details, and I assume it does initialize with such actual limit it can handle, right? |
In windows,
[soundfiler]
won't accept a-maxsize
flag bigger than 2.14748e+09 or something (I got that with trial and error) for some reason.the console shows a typical syntax error for
[soundfiler]
:The text was updated successfully, but these errors were encountered: