Mercurial > mplayer.hg
comparison stream/cookies.c @ 30454:c6ccbae868cf
Fix argument order for lseek, fixes cookie loading in Windows and in general
everywhere where SEEK_SET != 0.
author | reimar |
---|---|
date | Wed, 03 Feb 2010 17:50:18 +0000 |
parents | ce0122361a39 |
children | 38a8f88fab42 |
comparison
equal
deleted
inserted
replaced
30453:60fb098fe8cf | 30454:c6ccbae868cf |
---|---|
131 if (*length > SIZE_MAX - 1) { | 131 if (*length > SIZE_MAX - 1) { |
132 mp_msg(MSGT_NETWORK, MSGL_V, "File too big, could not malloc."); | 132 mp_msg(MSGT_NETWORK, MSGL_V, "File too big, could not malloc."); |
133 return NULL; | 133 return NULL; |
134 } | 134 } |
135 | 135 |
136 lseek(fd, SEEK_SET, 0); | 136 lseek(fd, 0, SEEK_SET); |
137 | 137 |
138 if (!(buffer = malloc(*length + 1))) { | 138 if (!(buffer = malloc(*length + 1))) { |
139 mp_msg(MSGT_NETWORK, MSGL_V, "Could not malloc."); | 139 mp_msg(MSGT_NETWORK, MSGL_V, "Could not malloc."); |
140 return NULL; | 140 return NULL; |
141 } | 141 } |