5 Commits

Author SHA1 Message Date
henrik.lundin
7a83951b27 Fix a bug in webrtc::ByteReader
The specializations for 4-byte reading did not return correct
values. This has to do with the order of casting and shifting. Also
adding a test to expose the bug (and verify the other byte sizes).

Review URL: https://codereview.webrtc.org/1615653011

Cr-Commit-Position: refs/heads/master@{#11364}
2016-01-25 07:47:59 +00:00
danilchap
6a6f0893dd in rtp_rtcp module:
fixed build/namespaces lint errors
  fixed readability/namespace lint errors

BUG=webrtc:5277
R=mflodman,stefan@webrtc.org

Review URL: https://codereview.webrtc.org/1506823002

Cr-Commit-Position: refs/heads/master@{#10978}
2015-12-10 20:39:16 +00:00
sprang
be9b7b6881 Make sure ByteReader and ByteWriter classes (and their specializations) don't perform operations that have implementation-specific or undefined behavior.
Pitfalls:

* Left shift of signed integer has undefined behavior
* Right-shift of signed integer has platform-specific behavior is value is negative
* Cast from unsigned to signed has undefined behavior if value is negative

BUG=webrtc:4824

Review URL: https://codereview.webrtc.org/1226993003

Cr-Commit-Position: refs/heads/master@{#9854}
2015-09-04 08:07:01 +00:00
sprang@webrtc.org
2a6558c2a5 Make sure ByteReader<T>::Read* is properly constified.
Also, start using it in real code...

BUG=
R=holmer@google.com, pbos@webrtc.org, stefan@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/37809004

Cr-Commit-Position: refs/heads/master@{#8181}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8181 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-01-28 12:38:16 +00:00
sprang@webrtc.org
499631c1e4 Utility class for reading/writing network-byte-ordered integers.
BUG=
R=holmer@google.com, mflodman@webrtc.org, stefan@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/2151008

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5203 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-12-03 13:22:48 +00:00