You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Let me know if I'm missing something, but I think this should work just fine. I don't really understand the reason for slicing a slice first and then checking it's length, when you can subtract index from original length and get the same result but without a risk of painc.
UPD: just noticed the same pattern in *_DelVendor. I think that it should be replaced as well
The text was updated successfully, but these errors were encountered:
Hey @eugennicoara it looks like the maintainer doesn't hang out on github a lot, could you maybe shoot them an email?
They seem to be quite a busy person, maybe one more email would get 30 or so minutes of their attention needed to merge this
Device: Juniper MX80
Dictionary: https://fossies.org/linux/freeradius-server/share/dictionary.erx
Error: runtime error: slice bounds out of range [34:0]
Failing generated function: ERXServiceActivate_Set
Code line in question:
radius/dictionarygen/vendor.go
Line 90 in 1006025
Proposed solution: replace that slicing and length check with just subtraction like this:
Let me know if I'm missing something, but I think this should work just fine. I don't really understand the reason for slicing a slice first and then checking it's length, when you can subtract index from original length and get the same result but without a risk of painc.
UPD: just noticed the same pattern in
*_DelVendor
. I think that it should be replaced as wellThe text was updated successfully, but these errors were encountered: