caption: two basic solution alternatives bounds - checking & auto - resise
exif: {"Image DocumentName": "Two basic solution alternatives: Bounds-checking & auto-resize", "Image ImageDescription": "Bounds-checking to stop overwrite; then if oversized: Stop processing input. Reject and try again, or even halt program (turns into DoS) Truncate data. Common approach, but not good: Terminates text in the middle at place of attacker\u2019s choosing. Can strip off critical data, escapes, etc. at the end. Can break in the middle of multi-byte character. UTF-8 character can take many bytes. UTF-16 usually 2 bytes/character, but not if it\u2019s outside BMP. Some routines truncate & return indicator so you can stop processing input. Auto-resize \u2013 move string if necessary. This is what most languages do other than C. Must deal with too large data. C: Requires more code changes/complexity in existing code. C/C++: Dynamic allocation manual, so new risks (double-free)", "Image XResolution": "37", "Image YResolution": "37", "Image ResolutionUnit": "Pixels/Centimeter", "Image Software": "SlidePlayer", "Image YCbCrPositioning": "Centered"}