Comments (8)
Is this an AVP you're getting off the wire or an AVP you're generating?
If it's from the network please provide me with a pcap to take a look. Otherwise you should provide the empty payload, which is an interface and currently cannot be nil. We could definitely talk about adding checks to all data types but that might cost performance.
from go-diameter.
I'm getting this off wire. I would be happy to provide pcap but the AVPs contain some potentially sensitive information I can't share.
from go-diameter.
So you're saying the parser crash when a FailedAVP
is received, containing the failed AVP with empty data? I can't reproduce that.
from go-diameter.
@taseppa: may be you can provide which failed AVP you are receiving and code for the parser? Some relevant text extract from pcap without sensitive information?
from go-diameter.
It should happen with every AVP that is of type unsigned32. If you check unsigned32.go:17
return Unsigned32(binary.BigEndian.Uint32(b)), nil
This will panic if byte array is empty http://play.golang.org/p/6ctpKdZ0H0
from go-diameter.
This patch should fix it, let me know otherwise.
from go-diameter.
At some point we might want to do some more strict checks in all these decoder functions to ensure the data is the exact length we want. If zero (the case of embedded in FailedAVP
) we return default value, if exact length we decode, other than that we return error.
from go-diameter.
This patch looks good, thanks!
from go-diameter.
Related Issues (20)
- Missing DeleteAVP functionality HOT 1
- CCR
- how to avoid dict.Default
- Empty AVP Payload causes crash
- Dangling AVP references in readerBufferPool
- How to parse AVP sub attributes ?
- unmarshal issue when two avp's with same id but different VendorId used
- diam_sctp_client is crashing on connection
- Make certificates optional in ListenAndServeTLS to allow an external callback
- server closes the connection HOT 3
- Performance on sctp is very poor
- Any way to leverage the XML to validate produced messages?
- Missing Handshake Notifications in channel
- multi-homing HOT 1
- One Client dials to Multiple Server HOT 2
- Close listening socket
- Diameter Client receving CCA HOT 3
- CCA Handler HOT 1
- CER/CEA remote peer validation HOT 4
- Query to know release date for new tag v4.0.5 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-diameter.