Menu

#2815 dtm: Missing error check of osaflog argument values

5.18.04
fixed
None
defect
dtm
-
minor
False
2018-04-04
2018-03-20
No

osaflog does not properly validate its argument values. In addition, there is a type mis-match since osaflog argument values are parsed as type int, but osaftransportd expects values of type size_t.

# osaflog --max-file-size=abcd
# osaflog --max-file-size=9999999999999999999999999999999999
# osaflog --max-file-size=-2
ERROR: osaftransportf replied '!max-file-size 18446744073709551615'
# 

Related

Tickets: #2820
Wiki: ChangeLog-5.18.04

Discussion

  • Anders Widell

    Anders Widell - 2018-03-27
    • status: accepted --> review
     
  • Anders Widell

    Anders Widell - 2018-04-04
    • status: review --> fixed
     
  • Anders Widell

    Anders Widell - 2018-04-04

    commit b3c8028c3312ffe13c815dbe0249947a5c4947dc (HEAD -> develop, origin/develop)
    Author: Anders Widell an..@..com
    Date: Tue Mar 27 16:25:39 2018 +0200

    dtm: Use base::StrToUint64 to parse command-line option arguments [#2815]
    
    Use the function base::StrToUint64 to pass command-line option arguments. This
    gives us error checking, and support for the k, M and G suffixes.
    
     

Log in to post a comment.