After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 316468 - Divisions by zero?
Divisions by zero?
Status: RESOLVED FIXED
Product: pango
Classification: Platform
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: pango-maint
pango-maint
Depends on:
Blocks:
 
 
Reported: 2005-09-16 12:33 UTC by Owen Taylor
Modified: 2005-11-23 15:23 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch marking divisons by zero (1.38 KB, patch)
2005-09-16 12:34 UTC, Owen Taylor
needs-work Details | Review

Description Owen Taylor 2005-09-16 12:33:25 UTC
Here's a patch from Steve Grubb which marks various
potential divisions by zero found by an automated checker
tool. I don't think any are of concern, but it might be
good to clean up (one is in test code, ther others 
can't be hit because the sample string is always non-zero length.
Comment 1 Owen Taylor 2005-09-16 12:34:23 UTC
Created attachment 52306 [details] [review]
Patch marking divisons by zero
Comment 2 Owen Taylor 2005-09-16 12:34:49 UTC
Comment on attachment 52306 [details] [review]
Patch marking divisons by zero

Marking as needs-work since it isn't a fix patch.
Comment 3 Behdad Esfahbod 2005-11-23 15:23:12 UTC
2005-11-23  Behdad Esfahbod  <behdad@gnome.org>

        Protect against possible division by zeros (#316468, Steve Grubb)

        * pango/pango-context.c (update_metrics_from_items),
        pango/pango-fontset.c (pango_fontset_real_get_metrics): If count is
        zero, do not alter approximate_{char,digit}_width.

        * pango/opentype/disasm.c: Err on invalid DeltaFormat.