Fix PNG crasher/hang. The problem is due to a the casting of float to int/unsigned.
Patch submitted by randeg@alum.rpi.edu r=pavlov@pavlov.net sr=tor@acm.org a=asa@mozilla.org # 200801 git-svn-id: svn://10.0.0.236/trunk@142608 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
040d929493
commit
73da294dd4
@ -208,8 +208,10 @@ info_callback(png_structp png_ptr, png_infop info_ptr)
|
||||
#endif
|
||||
|
||||
if (png_get_gAMA(png_ptr, info_ptr, &aGamma)) {
|
||||
if (aGamma < 0)
|
||||
if ((aGamma <= 0.0) || (aGamma > 21474.83)) {
|
||||
aGamma = 0.45455;
|
||||
png_set_gAMA(png_ptr, info_ptr, aGamma);
|
||||
}
|
||||
png_set_gamma(png_ptr, 2.2, aGamma);
|
||||
}
|
||||
else
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user