no error on NULL byte

This issue has been created since 2021-09-22.

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)
arp242 wrote this answer on 2021-09-23

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.

More Details About Repo
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

YOU MAY BE INTERESTED

Issue Title Created Date Comment Count Updated Date
TPU utilization could be improved further? 2 2022-05-11 2023-03-16
Is there a way to use an enum type inside another enum? 2 2022-06-19 2023-02-11
Link Typescript Migration 5 2022-10-02 2023-02-04
PairTools sort failure on merged data 9 2020-05-26 2023-02-22
Timelimit in seconds or miliseconds in runexec? 3 2022-01-26 2023-01-26
[Bug] Docker Hub (app_flowy:1): Gtk-WARNING **: 10:44:25.079: cannot open display: 8 2022-02-26 2023-01-01
ReflectometryBackgroundSubtraction dialog crashes if workspace group present in ADS 1 2022-03-08 2023-02-12
Validate that parameters are hex 1 2022-08-30 2023-02-15
Errors relating to "Cannot convert CHARACTER(1) to REAL(8)" when install GSI 0 2021-09-05 2023-02-22
[Feature][flink-transform] add transform for register user define function 1 2022-05-07 2023-02-27
[Bug] producing the latest block template takes too long 1 2022-07-10 2023-02-12
Start migrating to OpenSSL 3.0 22 2020-10-07 2023-02-25
error: EMFILE: too many open files, open 'D:\Games\Vortex\Downloads\skyrim\__vortex_canary' 1 2023-03-04 2023-03-15
Declaration that indexes itself crashes the compiler 0 2022-02-13 2023-03-11
Unhandled AssertionError on the RPC endpoint 2 2021-05-15 2022-12-18
Package download GUI bug 0 2021-05-03 2023-02-04
Use of Cypress Recurse produces Webpack Compilation Error 4 2021-11-21 2023-02-16
running docker image janeczku/powerdns-exporter 0 2021-08-24 2022-09-18
Trim trailing whitespaces 2 2022-01-07 2023-02-26
Crop feature doesn't work for some videos 0 2022-12-22 2023-02-26
Add support for multibranch pipelines 4 2017-10-06 2023-02-03
AQI: Support updating an action queue item in place from indexer-cli 0 2022-08-02 2022-10-11
R CMD check fails with dev roxygen2 5 2022-04-28 2023-03-15
LoadBalancer failover is broken 3 2021-10-26 2023-03-10
snake_config里面的ro的含义? 3 2022-01-28 2023-02-25
Mods with lexicographically larger IDs than patchouli cannot use custom book items 0 2022-06-22 2023-03-11
how to savefig with dpi=300 7 2021-01-07 2023-02-15
New-IntuneWin32AppRequirementRule not setting MinimumFreeDiskSpaceInMB 4 2022-11-08 2023-03-14
Fix off-centered icon classes in Linux 0 2022-06-17 2023-02-19
sftp support 1. Manual refresh 2. Popup panel resizing 3. Copy current directory path 4. Manual input path navigation 5. Cache remember last visit etc. 0 2022-05-09 2023-02-23
when call AbortController.abort function, cannot passed in a parameter 2 2021-12-15 2023-03-22
add a menu at draw marker? 2 2023-01-20 2023-03-05
new feature : 数据加密的需求 1 2022-11-18 2023-03-15
MaterialDatePicker callbacks lost on orientation change 7 2020-09-04 2023-03-01
TypeError: Cannot read properties of undefined (reading 'labels') 6 2021-12-02 2023-03-11
Introduce Github Co-Pilot Tool 0 2022-10-14 2023-03-14
What do the wakelocks actually do? 3 2018-12-12 2023-02-28
UI issue when using the makeAnimated() 5 2022-06-30 2023-02-01
Terraform version is outdated 2 2022-09-15 2023-03-03
Duplicate CGM data as the readings , in virtual pump and data coming from Knighscout not via xdrip 2 2022-01-15 2023-03-10
Question about indrect call icfg 1 2022-09-12 2023-02-12
waitForIPv{4,6} is not set correctly when ipAddrs is set 2 2022-10-06 2023-02-06
k8s not scanning control plane pods (apiserver, controllermanagerd, etc, scheduler) 0 2022-07-25 2023-02-10
C# 7.x: Unifying treatment of discards and local variables in patterns, deconstruction and out variables 4 2022-04-28 2023-02-26
ServiceLinkedRole state are not properly tracked 1 2023-02-03 2023-03-11
"unable to validate AWS credentials" when setting AWS profile via Pulumi config 10 2023-02-02 2023-02-28
Multiplayer fails to start 8 2022-03-27 2023-03-16
"could not load libvmaf model" with built-in models 3 2022-02-17 2023-02-14
Import error with newer itsdangerous versions 1 2022-03-03 2023-02-24
TreeSelect下拉列表左侧的三角形符号不展示 1 2021-11-12 2023-03-11