mono0926 / LicensePlist

A license list generator of all your dependencies for iOS applications
https://www.slideshare.net/mono0926/licenseplist-a-license-list-generator-of-all-your-dependencies-for-ios-applications
MIT License
2.43k stars 146 forks source link

Fixes out of bounds access if package.swift cannot be parsed #193

Closed stmitt closed 2 years ago

mono0926 commented 2 years ago

Thanks, released: https://github.com/mono0926/LicensePlist/releases/tag/3.22.3

bennokress commented 2 years ago

There's an error in this PR (which is why all the V2 naming tests are red)! I'm currently on vacation so I can't fix it, but looking at the changes in this PR: index [1] is obviously not .first, so now we're probably always using the fallback name again (parsing from the Github URL). A possible solution woud be to use the Array Extension at the end of the file .element(at: 1) and guarding that !startingPoint.isEmpty afterwards or writing another extension that returns nil if the element at that index doesn't exist.

Otherwise: good catch, I missed that when implementing the new V2 naming solution 👍🏼

mono0926 commented 2 years ago

@bennokress

Sorry, I missed 🙏

Thanks, I've fixed it and released: #195, https://github.com/mono0926/LicensePlist/releases/tag/3.22.4