Merge pull request #3522 from thaJeztah/20.10_backport_json_unmarshal_pointer

[20.10 backport] Fix incorrect pointer inputs to `json.Unmarshal`
This commit is contained in:
Sebastiaan van Stijn 2022-04-14 16:16:13 +02:00 committed by GitHub
commit 994ed4085b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -119,7 +119,7 @@ func (configFile *ConfigFile) LegacyLoadFromReader(configData io.Reader) error {
// LoadFromReader reads the configuration data given and sets up the auth config
// information with given directory and populates the receiver object
func (configFile *ConfigFile) LoadFromReader(configData io.Reader) error {
if err := json.NewDecoder(configData).Decode(&configFile); err != nil && !errors.Is(err, io.EOF) {
if err := json.NewDecoder(configData).Decode(configFile); err != nil && !errors.Is(err, io.EOF) {
return err
}
var err error