[GRASS-dev] [GRASS GIS] #3564: Inconsistent results from qsort callback in g.mkfontcap

GRASS GIS trac at osgeo.org
Tue May 22 00:15:29 PDT 2018

#3564: Inconsistent results from qsort callback in g.mkfontcap
  Reporter:  yugr     |      Owner:  grass-dev@…
      Type:  defect   |     Status:  new
  Priority:  normal   |  Milestone:  7.6.0
 Component:  Default  |    Version:  7.4.0
Resolution:           |   Keywords:  qsort callback
       CPU:  All      |   Platform:  All

Comment (by mmetz):

 Replying to [comment:2 yugr]:
 > Hi Markus,
 > > If you already have a list of these many other problems, can you
 provide such a list? That would be very helpful.
 > I wasn't sure you'd be interested in these potential overflows (e.g.
 some may be highly unlikely due to small subtracted values) so didn't
 report them in first comment.

 I am interested. The comparison in g.mkfontcap was wrong, it returned 0
 when it should return -1. The comparison in r.kappa was clearly dangerous
 because it converted long to int. The remaining cases need to be checked
 individually: if the integers to be subtracted are always positive,
 integer overflow can not happen.

 Thanks for the list!

Ticket URL: <https://trac.osgeo.org/grass/ticket/3564#comment:3>
GRASS GIS <https://grass.osgeo.org>

More information about the grass-dev mailing list