Playing with Go dev.fuzz and found an odd one. [abc]\x00
errors, but [abcd]\x00
doesn't.
https://play.golang.org/p/m3GHDLMYXrA
toml.Unmarshal([]byte("[abcd]\x00\na=b"), &v)
It checks the first six bytes for NULL as a "quick check" to see if the file is in UTF-16, mostly to give a more user-friendly error message. That explains why you get the error for one string and not the other :-)
It checks for control characters inside various tokens (strings, keys, etc.) but it just reads over it outside of that; that should be fixed.
Owner Name | BurntSushi |
Repo Name | toml |
Full Name | BurntSushi/toml |
Language | Go |
Created Date | 2013-02-26 |
Updated Date | 2023-03-20 |
Star Count | 4154 |
Watcher Count | 84 |
Fork Count | 518 |
Issue Count | 15 |