Commit 6e54d4d
committed
fix: address PR docker#1889 review feedback for vision support
- Guard against decompression bombs in ResizeImage by rejecting decoded
images exceeding 20000x20000 pixels before processing
- Fix image stripping for models with unknown capabilities: only strip
images when modalities are explicitly known and exclude image input
- Check file existence before calling IsImageFile in read_file handler
to provide clearer errors and avoid type detection on missing files
Assisted-By: cagent1 parent 93b9555 commit 6e54d4d
File tree
3 files changed
+30
-7
lines changed- pkg
- chat
- runtime
- tools/builtin
3 files changed
+30
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
25 | 29 | | |
26 | 30 | | |
27 | 31 | | |
| |||
75 | 79 | | |
76 | 80 | | |
77 | 81 | | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
78 | 89 | | |
79 | 90 | | |
80 | 91 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1121 | 1121 | | |
1122 | 1122 | | |
1123 | 1123 | | |
1124 | | - | |
| 1124 | + | |
1125 | 1125 | | |
1126 | 1126 | | |
1127 | 1127 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
522 | 522 | | |
523 | 523 | | |
524 | 524 | | |
525 | | - | |
526 | | - | |
527 | | - | |
528 | | - | |
529 | | - | |
530 | | - | |
| 525 | + | |
| 526 | + | |
531 | 527 | | |
532 | 528 | | |
533 | 529 | | |
| |||
545 | 541 | | |
546 | 542 | | |
547 | 543 | | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
548 | 560 | | |
549 | 561 | | |
550 | 562 | | |
| |||
0 commit comments