GNOME Bugzilla – Bug 722657
minor OSC 4 handler issues
Last modified: 2018-03-27 17:48:18 UTC
While looking at the OSC 104 patch, I noticed that the OSC 4 handler - uses strtoul instead of g_ascii_strtoull, and - doesn't limit the length of the value array to something sensible (like VTE_PALETTE_SIZE or so; but need to check if xterm limits this or not)
- Is it because strtoul is locale-dependent? Good point. - If it's for protection against way too long escape sequences, I guess it should be addressed before matching. If it survives the match (meaning we already see the terminating BEL/ST) I guess it's okay to process them all.
(In reply to comment #1) > - Is it because strtoul is locale-dependent? Good point. Yes. > - If it's for protection against way too long escape sequences, I guess it > should be addressed before matching. If it survives the match (meaning we > already see the terminating BEL/ST) I guess it's okay to process them all. Right, this should be done pre-matching.
Fixed on master.