10000 Comparing v1.0.0...v1.0.1 · DHowett/go-plist · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: DHowett/go-plist
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.0.0
Choose a base ref
...
head repository: DHowett/go-plist
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v1.0.1
Choose a head ref
  • 3 commits
  • 5 files changed
  • 3 contributors

Commits on Nov 2, 2022

  1. Fix Marshaler support for interface fields.

    Expand interface check beyond the immediate type of the value. This
    allows for custom marshaling of structures with interface and indirect
    field types.
    
    Closes #72
    grahammiln authored and DHowett committed Nov 2, 2022
    1 Configuration menu
    Copy the full SHA
    663ca47 View commit details
    Browse the repository at this point in the history

Commits on May 1, 2023

  1. bplist: teach the parser about unusual OffsetIntSize values (#78)

    This is only a partial fix which works for the value of 3 and for any
    value < 8, but won't help in other cases. Supporting values < 16 should
    also be possible, but I didn't bother with it. Also this doesn't touch
    `bplist_generator` and hence won't make use of non-standard values for
    generating plists (while those values could probably give a benefit of
    slightly reduced plist size).
    
    We confirmed that this is supported by the CoreFoundation bplist parser.
    
    Closes #77
    MarSoft authored May 1, 2023
    Configuration menu
    Copy the full SHA
    e03e84e View commit details
    Browse the repository at this point in the history

Commits on Oct 24, 2023

  1. text: address out-of-bounds panic in parseGNUStepValue (#79)

    This PR addresses a `index out of range` panic in `parseGNUStepValue`.
    This panic was identified as part of internal fuzzer based testing of
    our code.
    
    Reproducer
    ```go
    package main
    
    import (
    	"bytes"
    
    	"howett.net/plist"
    )
    
    func main() {
    	data := []byte(`(plist versionGetValue<*B"">`)
    
    	dec := plist.NewDecoder(bytes.NewReader(data))
    	res := make(map[string]interface{})
    
    	_ = dec.Decode(res)
    }
    ```
    
    Results
    
    ```shell
    go run ./main.go
    
    panic: runtime error: index out of range [0] with length 0 [recovered]
    	panic: runtime error: index out of range [0] with length 0 [recovered]
    	panic: runtime error: index out of range [0] with length 0
    
    goroutine 1 [running]:
    howett.net/plist.(*Decoder).Decode.func1()
    	/Users/me/git/go-plist/decode.go:30 +0xac
    panic({0x1023deaa0?, 0x14000116018?})
    	/usr/local/go/src/runtime/panic.go:914 +0x218
    howett.net/plist.(*textPlistParser).parseDocument.func1()
    	/Users/me/git/go-plist/text_parser.go:74 +0xe0
    panic({0x1023deaa0?, 0x14000116018?})
    	/usr/local/go/src/runtime/panic.go:914 +0x218
    howett.net/plist.(*textPlistParser).parseGNUStepValue(0x1400010aea0)
    	/Users/me/git/go-plist/text_parser.go:460 +0x4e0
    howett.net/plist.(*textPlistParser).parsePlistValue(0x1400010aea0)
    	/Users/me/git/go-plist/text_parser.go:554 +0x17c
    howett.net/plist.(*textPlistParser).parseArray(0x1400010aea0)
    	/Users/me/git/go-plist/text_parser.go:399 +0xd4
    howett.net/plist.(*textPlistParser).parsePlistValue(0x1400010aea0)
    	/Users/me/git/go-plist/text_parser.go:567 +0x190
    howett.net/plist.(*textPlistParser).parseDocument(0x1400010aea0)
    	/Users/me/git/go-plist/text_parser.go:91 +0xa4
    howett.net/plist.(*Decoder).Decode(0x14000140000, {0x1023d21e0, 0x140001101b0})
    	/Users/me/git/go-plist/decode.go:58 +0x210
    main.main()
    	/Users/me/git/go-plist/cmd/crasher/main.go:15 +0xfc
    exit status 2
    ```
    
    I built a quick Fuzzer for `Decode` with a good test corpus in order to
    identify related bugs but nothing shook out in roughly an hour.
    TomSellers authored Oct 24, 2023
    Configuration menu
    Copy the full SHA
    5afcd13 View commit details
    Browse the repository at this point in the history
Loading
0