Skip to content

Commit bf5a33a

Browse files
authored
Merge pull request #22 from cryptlex/fix-buffer-size
fix: buffer size
2 parents ba7c88f + b5edfbf commit bf5a33a

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/main/java/com/cryptlex/lexfloatclient/LexFloatClient.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -353,14 +353,14 @@ public static String GetHostLicenseMetadata(String key) throws LexFloatClientExc
353353
public static String GetFloatingClientMetadata(String key) throws LexFloatClientException, UnsupportedEncodingException {
354354
int status;
355355
if (Platform.isWindows()) {
356-
CharBuffer buffer = CharBuffer.allocate(256);
357-
status = LexFloatClientNative.GetFloatingClientMetadata(new WString(key), buffer, 256);
356+
CharBuffer buffer = CharBuffer.allocate(4096);
357+
status = LexFloatClientNative.GetFloatingClientMetadata(new WString(key), buffer, 4096);
358358
if (LF_OK == status) {
359359
return buffer.toString().trim();
360360
}
361361
} else {
362-
ByteBuffer buffer = ByteBuffer.allocate(256);
363-
status = LexFloatClientNative.GetFloatingClientMetadata(key, buffer, 256);
362+
ByteBuffer buffer = ByteBuffer.allocate(4096);
363+
status = LexFloatClientNative.GetFloatingClientMetadata(key, buffer, 4096);
364364
if (LF_OK == status) {
365365
return new String(buffer.array(), "UTF-8");
366366
}

0 commit comments

Comments
 (0)