-2006-12-29 Ulrich Drepper <drepper@redhat.com>
+2006-12-27 Roland McGrath <roland@redhat.com>
- * dwfl_module.c (compare_modules): Do not try to be smart and use
- subtraction which can lead to wrong results.
- Patch by Frank Eigler <fche@redhat.com>.
+ * dwfl_module.c (compare_modules): Fix address comparison to avoid
+ signed overflow. Patch by Frank Ch. Eigler <fche@redhat.com>.
2006-10-30 Roland McGrath <roland@redhat.com>
if (m2 == NULL)
return 1;
- if (m1->low_addr < m2->low_addr
+ /* No signed difference calculation is correct here, since the
+ terms are unsigned and could be more than INT64_MAX apart. */
+ if (m1->low_addr < m2->low_addr)
return -1;
if (m1->low_addr > m2->low_addr)
return 1;