GauthamBanasandra commented on code in PR #4576:
URL: https://github.com/apache/hadoop/pull/4576#discussion_r924065460
##########
hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/third_party/uriparser2/uriparser2/uriparser2.c:
##########
@@ -71,9 +71,11 @@ static const char *copy_path(const UriPathSegmentA *ps, char
**buffer) {
static int parse_int(const char *first, const char *after_last) {
const int size = after_last - first;
if (size) {
- char buffer[size + 1];
+ char* buffer = (char*) malloc(size + 1);
Review Comment:
Local arrays are stored on the stack. The stack has a fixed limit. Thus,
MSVC tries to play safe by making the size a compile-time requirement, forcing
us to use the heap. I don't know how GCC solves this though.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]