Originally committed as revision 24833 to svn://svn.ffmpeg.org/ffmpeg/trunk
| ... | ... |
@@ -35,7 +35,6 @@ |
| 35 | 35 |
|
| 36 | 36 |
/* used for protocol handling */ |
| 37 | 37 |
#define BUFFER_SIZE 1024 |
| 38 |
-#define URL_SIZE 4096 |
|
| 39 | 38 |
#define MAX_REDIRECTS 8 |
| 40 | 39 |
|
| 41 | 40 |
typedef struct {
|
| ... | ... |
@@ -46,7 +45,7 @@ typedef struct {
|
| 46 | 46 |
int http_code; |
| 47 | 47 |
int64_t chunksize; /**< Used if "Transfer-Encoding: chunked" otherwise -1. */ |
| 48 | 48 |
int64_t off, filesize; |
| 49 |
- char location[URL_SIZE]; |
|
| 49 |
+ char location[MAX_URL_SIZE]; |
|
| 50 | 50 |
HTTPAuthState auth_state; |
| 51 | 51 |
unsigned char headers[BUFFER_SIZE]; |
| 52 | 52 |
int willclose; /**< Set if the server correctly handles Connection: close and will close the connection after feeding us the content. */ |
| ... | ... |
@@ -162,7 +161,7 @@ static int http_open(URLContext *h, const char *uri, int flags) |
| 162 | 162 |
h->is_streamed = 1; |
| 163 | 163 |
|
| 164 | 164 |
s->filesize = -1; |
| 165 |
- av_strlcpy(s->location, uri, URL_SIZE); |
|
| 165 |
+ av_strlcpy(s->location, uri, sizeof(s->location)); |
|
| 166 | 166 |
|
| 167 | 167 |
return http_open_cnx(h); |
| 168 | 168 |
} |