Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita3e6421

Browse files
gculikslandelle
authored andcommitted
Fixed integer overflow when file size > Integer.MAX_INT,closeAsyncHttpClient#1342
Motivation:`FilePart` currently uses an int to track written length. Huge files can cause an overflow.Modification:Use a long instead of an intResult:No more overflow
1 parent1f678c4 commita3e6421

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎src/main/java/com/ning/http/client/multipart/FilePart.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ public long write(WritableByteChannel target, byte[] boundary) throws IOExceptio
101101

102102
handler.start();
103103

104-
intlength =0;
104+
longlength =0;
105105

106106
length +=MultipartUtils.writeBytesToChannel(target,generateFileStart(boundary));
107107

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp