View Issue Details

IDProjectCategoryView StatusLast Update
0003143GNUnettransport servicepublic2013-12-24 20:54
ReporterLRN Assigned ToMatthias Wachs  
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Product VersionGit master 
Target Version0.10.0Fixed in Version0.10.0 
Summary0003143: Division by zero in send_utilization_data
Descriptionstruct GNUNET_TIME_Relative delta;

delta = GNUNET_TIME_absolute_get_difference(n->last_util_transmission, GNUNET_TIME_absolute_get());

bps_pl_in = 0;
if (0 != n->util_payload_bytes_recv)
  bps_pl_in = (1000LL * 1000LL * n->util_payload_bytes_recv) / (delta.rel_value_us);
bps_pl_out = 0;

If delta value is zero, the program crashes.
While it might be a bug that the function is called again too soon (practically immediately), it's still a good idea to handle the zero-division case, IMO...
TagsNo tags attached.

Activities

Matthias Wachs

2013-11-28 14:54

reporter   ~0007740

fixed in 30934

Issue History

Date Modified Username Field Change
2013-11-28 14:23 LRN New Issue
2013-11-28 14:23 LRN Status new => assigned
2013-11-28 14:23 LRN Assigned To => Matthias Wachs
2013-11-28 14:54 Matthias Wachs Note Added: 0007740
2013-11-28 14:54 Matthias Wachs Status assigned => resolved
2013-11-28 14:54 Matthias Wachs Resolution open => fixed
2013-11-28 20:22 Christian Grothoff Product Version => Git master
2013-11-28 20:22 Christian Grothoff Fixed in Version => 0.10.0
2013-11-28 20:22 Christian Grothoff Target Version => 0.10.0
2013-12-24 20:54 Christian Grothoff Status resolved => closed