Skip to content

Commit

Permalink
rtsp: fix endian bug in challenge computation
Browse files Browse the repository at this point in the history
on MIPS platform the IP address was reversed...
  • Loading branch information
Quentin Smart authored and abrasive committed Apr 3, 2013
1 parent 89611b8 commit f01b957
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions rtsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -479,11 +479,8 @@ static void apple_challenge(int fd, rtsp_message *req, rtsp_message *resp) {
#endif
{
struct sockaddr_in *sa = (struct sockaddr_in*)(&fdsa);
unsigned int ip = sa->sin_addr.s_addr;
for (i=0; i<4; i++) {
*bp++ = ip & 0xff;
ip >>= 8;
}
memcpy(bp, &sa->sin_addr.s_addr, 4);
bp += 4;
}

for (i=0; i<6; i++)
Expand Down

0 comments on commit f01b957

Please sign in to comment.