diff options
| author | David Gibson <david@gibson.dropbear.id.au> | 2025-02-19 14:14:27 +1100 |
|---|---|---|
| committer | Stefano Brivio <sbrivio@redhat.com> | 2025-02-19 06:35:38 +0100 |
| commit | 3dc7da68a2731f661d7251a5fc759daffe24ca70 (patch) | |
| tree | 2c4f4909f08ad59ac07ffda4adfa17b0b8bf88a0 /contrib/qemu/git: | |
| parent | 65e317a8fca4eaf9efbfe642cc7e4322c56aa1f7 (diff) | |
| download | passt-3dc7da68a2731f661d7251a5fc759daffe24ca70.tar passt-3dc7da68a2731f661d7251a5fc759daffe24ca70.tar.gz passt-3dc7da68a2731f661d7251a5fc759daffe24ca70.tar.bz2 passt-3dc7da68a2731f661d7251a5fc759daffe24ca70.tar.lz passt-3dc7da68a2731f661d7251a5fc759daffe24ca70.tar.xz passt-3dc7da68a2731f661d7251a5fc759daffe24ca70.tar.zst passt-3dc7da68a2731f661d7251a5fc759daffe24ca70.zip | |
conf: More thorough error checking when parsing --mtu option
We're a bit sloppy with parsing MTU which can lead to some surprising,
though fairly harmless, results:
* Passing a non-number like '-m xyz' will not give an error and act like
-m 0
* Junk after a number (e.g. '-m 1500pqr') will be ignored rather than
giving an error
* We parse the MTU as a long, then immediately assign to an int, so on
some platforms certain ludicrously out of bounds values will be
silently truncated, rather than giving an error
Be a bit more thorough with the error checking to avoid that.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'contrib/qemu/git:')
0 files changed, 0 insertions, 0 deletions
