Make do { ... } while (...); into while (...) { ... };.
Fixes behaviour with empty files. git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3025 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
parent
f087a937ff
commit
5a0e1849d5
|
@ -1333,7 +1333,7 @@ int sc_pkcs15_parse_df(struct sc_pkcs15_card *p15card,
|
||||||
return r;
|
return r;
|
||||||
|
|
||||||
p = buf;
|
p = buf;
|
||||||
do {
|
while (bufsize && *p != 0x00) {
|
||||||
const u8 *oldp;
|
const u8 *oldp;
|
||||||
size_t obj_len;
|
size_t obj_len;
|
||||||
|
|
||||||
|
@ -1372,7 +1372,7 @@ int sc_pkcs15_parse_df(struct sc_pkcs15_card *p15card,
|
||||||
sc_perror(ctx, r, "Error adding object");
|
sc_perror(ctx, r, "Error adding object");
|
||||||
goto ret;
|
goto ret;
|
||||||
}
|
}
|
||||||
} while (bufsize && *p != 0x00);
|
};
|
||||||
ret:
|
ret:
|
||||||
free(buf);
|
free(buf);
|
||||||
return r;
|
return r;
|
||||||
|
|
Loading…
Reference in New Issue