Page MenuHomeFreeBSD

veriexec: fixed usage and getopt issue on armv6
ClosedPublic

Authored by sebastien.bini_stormshield.eu on Sep 7 2022, 8:06 AM.
Tags
None
Referenced Files
F163625023: D36477.diff
Fri, Jul 24, 11:16 PM
Unknown Object (File)
Wed, Jul 22, 8:08 PM
Unknown Object (File)
Mon, Jul 20, 9:13 AM
Unknown Object (File)
Sat, Jul 11, 8:57 PM
Unknown Object (File)
Jun 21 2026, 10:00 PM
Unknown Object (File)
Jun 14 2026, 3:23 PM
Unknown Object (File)
May 20 2026, 6:53 PM
Unknown Object (File)
May 17 2026, 8:23 AM
Subscribers

Details

Reviewers
wma
mw
imp
Summary

This fixes an issue introduced by https://reviews.freebsd.org/D33246

getopt returns an int, which was stored inside c of type char. c was then compared to -1. All those type conversions worked fine on our amd64 systems, but not on armv6 architecture.

The -1 returned by getopt, stored in c, never successfully compared to -1, causing the program to fall into the usage error in the default: switch case.

I also fixed the usage function, as -C takes a path as parameter.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 47276
Build 44163: arc lint + arc unit