Closed Bug 239587 Opened 22 years ago Closed 18 years ago

Benign parameter mismatch

Categories

(Core :: Graphics: ImageLib, defect)

x86
Windows XP
defect
Not set
trivial

Tracking

()

RESOLVED FIXED

People

(Reporter: mmoy, Unassigned)

Details

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7b) Gecko/20040404 Firefox/0.8.0+ (mmoy-O2-GL7-SSE2-crc32-quek01235) Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7b) Gecko/20040404 Firefox/0.8.0+ (mmoy-O2-GL7-SSE2-crc32-quek01235) There are three calles to gif_calloc in gif2.cpp: if (!gs->prefix) gs->prefix = (PRUint16 *)gif_calloc(sizeof(PRUint16), MAX_BITS); if (!gs->suffix) gs->suffix = ( PRUint8 *)gif_calloc(sizeof(PRUint8), MAX_BITS); if (!gs->stack) The reversal doesn't cause any damage becase multiplication is commutative but this should be fixed for code correctness. gs->stack = ( PRUint8 *)gif_calloc(sizeof(PRUint8), MAX_BITS); The call is defined as static inline void *gif_calloc(size_t n, size_t s) With the number of <object> first and the size of <object> second and this agrees with the format in K&R. The three calls, though, have the params in the wrong order. Reproducible: Always Steps to Reproduce: 1. 2. 3.
Moving to Browser->ImageLib Reporter, Firefox consists of mozilla/browser, mozilla/chrome and mozilla/toolkit, please file bugs with shared components against the Browser product, thanks.
Assignee: firefox → jdunn
Component: General → ImageLib
Product: Firefox → Browser
Version: unspecified → Trunk
This is an automated message, with ID "auto-resolve01". This bug has had no comments for a long time. Statistically, we have found that bug reports that have not been confirmed by a second user after three months are highly unlikely to be the source of a fix to the code. While your input is very important to us, our resources are limited and so we are asking for your help in focussing our efforts. If you can still reproduce this problem in the latest version of the product (see below for how to obtain a copy) or, for feature requests, if it's not present in the latest version and you still believe we should implement it, please visit the URL of this bug (given at the top of this mail) and add a comment to that effect, giving more reproduction information if you have it. If it is not a problem any longer, you need take no action. If this bug is not changed in any way in the next two weeks, it will be automatically resolved. Thank you for your help in this matter. The latest beta releases can be obtained from: Firefox: http://www.mozilla.org/projects/firefox/ Thunderbird: http://www.mozilla.org/products/thunderbird/releases/1.5beta1.html Seamonkey: http://www.mozilla.org/projects/seamonkey/
I guess I should do a patch.
Assignee: jdunn → nobody
QA Contact: imagelib
This 'calloc's are no longer there in the code: 2005-03-10 05:31 Bug 274391 - clean up gif decoder allocation.
Status: UNCONFIRMED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.