Details
-
Task
-
Status: Open (View Workflow)
-
Minor
-
Resolution: Unresolved
-
None
-
None
-
None
Description
This issue is pending verification and triage.
The current code scans a number from the input string (using strtoull) only to convert it back to a string at another buffer (using ullstr). It locates the , delimiter after processing the current number.
Using a converter pair to substring a number is (obviously) wasteful computations. It could instead locate the delimiter first and then copy the substring.
That said, at least this strategy sanitizes the input a bit, but the behavior of its current implementation, strtoull(pos, NULL, 0), is questionable:
- It recognizes 0x/0 as hexadecimal/octal prefixes.
- It ignores non-numeric suffixes; e.g., truncates 1337code as 1337.
- It converts "completely" invalid input (such as `hello`) to 0.
Question: What should mariadb-admin kill consider invalid input as, and what should it do about them?
Attachments
Issue Links
- split from
-
MDEV-35599 Which llstr(value, buff) can we replace with "%lld" ?
-
- Stalled
-