--- a/src/java.smartcardio/share/native/libj2pcsc/pcsc.c Fri Jul 13 13:00:36 2018 -0700
+++ b/src/java.smartcardio/share/native/libj2pcsc/pcsc.c Fri Jul 13 17:42:24 2018 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -192,7 +192,7 @@
}
dprintf1("-size: %d\n", size);
- if (size) {
+ if (size != 0) {
mszReaders = malloc(size);
if (mszReaders == NULL) {
throwOutOfMemoryError(env, NULL);
@@ -205,6 +205,8 @@
return NULL;
}
dprintf1("-String: %s\n", mszReaders);
+ } else {
+ return NULL;
}
result = pcsc_multi2jstring(env, mszReaders);