[DragonFlyBSD - Bug #3009] (Closed) lib/* : three problems

bugtracker-admin at leaf.dragonflybsd.org bugtracker-admin at leaf.dragonflybsd.org
Mon Apr 10 22:16:11 PDT 2017

Issue #3009 has been updated by dillon.

Status changed from New to Closed

Limit the sscanf() and remove the redundant conditions as specified.

Fix committed by Matt

Bug #3009: lib/* : three problems

* Author: dcb
* Status: Closed
* Priority: Normal
* Assignee: 
* Category: 
* Target version: 

dragonfly/lib/libc/net/ether_addr.c:73]: (warning) sscanf() without field width limits can crash with huge input data.

Looks like the %s needs limiting, maybe to MAXHOSTNAMELEN


[dragonfly/lib/libdevstat/devstat.c:612]: (style) Redundant condition: (matches[i].match_fields&DEVSTAT_MATCH_PASS)==0. 'A || (!A && B)' is equivalent to 'A || B'


[dragonfly/lib/libdevstat/devstat.c:621]: (style) Redundant condition: (matches[i].match_fields&DEVSTAT_MATCH_PASS)==0. 'A || (!A && B)' is equivalent to 'A || B'


You have received this notification because you have either subscribed to it, or are involved in it.
To change your notification preferences, please click here: http://bugs.dragonflybsd.org/my/account

More information about the Bugs mailing list