Project

General

Profile

Actions

Bug #10324

closed

topo_usb_parse_port_type() gets value check wrong

Added by John Levon over 4 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Start date:
2019-01-30
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage smatch
Gerrit CR:
External Bug:

Description

The long returned from strtol() cannot be more than UINT_MAX.

Actions #1

Updated by John Levon over 4 years ago

  • Tags changed from needs-triage to needs-triage smatch

It's 32-bit. While it seems like any value > 0xff is invalid, we'll just check explicitly for UINT_MAX here.

Actions #2

Updated by Electric Monk over 4 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

git commit 022bfefbcaaea5feb95b93e32451de7e29dbcb58

commit  022bfefbcaaea5feb95b93e32451de7e29dbcb58
Author: John Levon <john.levon@joyent.com>
Date:   2019-02-01T19:03:00.000Z

    10324 topo_usb_parse_port_type() gets value check wrong
    Reviewed by: Robert Mustacchi <rm@joyent.com>
    Reviewed by: Andy Stormont <astormont@racktopsystems.com>
    Reviewed by: Gergő Doma <domag02@gmail.com>
    Approved by: Richard Lowe <richlowe@richlowe.net>

Actions

Also available in: Atom PDF