Commit b9769c1
committed
fix(tpm2_attr_util): tighten token parsing in handle_dispatch
Prevents false matches like (name = "foo" vs. token = "foobar...") and
spurious dispatch_err during table iteration.
- Inline token_match() into handle_dispatch()
- no-arg tokens require exact strcmp(token, name) match
- arg tokens must be in "name=arg" form, which avoid prefix matches
- Split token on '=' only after a confirmed match; keep non-matching
entries from failing
Signed-off-by: Takuma IMAMURA <209989118+hyperfinitism@users.noreply.github.com>1 parent 4a87504 commit b9769c1
1 file changed
Lines changed: 25 additions & 32 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
381 | 381 | | |
382 | 382 | | |
383 | 383 | | |
384 | | - | |
385 | | - | |
386 | | - | |
387 | | - | |
388 | | - | |
389 | | - | |
390 | | - | |
391 | | - | |
392 | | - | |
393 | | - | |
394 | | - | |
395 | | - | |
396 | | - | |
397 | | - | |
398 | | - | |
399 | 384 | | |
400 | 385 | | |
401 | 386 | | |
| |||
408 | 393 | | |
409 | 394 | | |
410 | 395 | | |
411 | | - | |
412 | | - | |
413 | | - | |
414 | | - | |
415 | | - | |
416 | | - | |
417 | | - | |
418 | | - | |
419 | | - | |
420 | 396 | | |
421 | | - | |
422 | | - | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
423 | 412 | | |
424 | 413 | | |
425 | 414 | | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
426 | 420 | | |
427 | | - | |
428 | | - | |
429 | | - | |
430 | | - | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
431 | 424 | | |
432 | 425 | | |
433 | 426 | | |
434 | 427 | | |
435 | | - | |
436 | | - | |
| 428 | + | |
| 429 | + | |
437 | 430 | | |
438 | 431 | | |
439 | 432 | | |
| |||
0 commit comments