Project

General

Profile

Bug #10324

topo_usb_parse_port_type() gets value check wrong

Added by John Levon 10 months ago. Updated 10 months ago.

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

100%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage smatch

Description

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

History

#1

Updated by John Levon 10 months 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.

#2

Updated by Electric Monk 10 months 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>

Also available in: Atom PDF