Navigation Menu

Skip to content

Commit

Permalink
8266168: -Wmaybe-uninitialized happens in check_code.c
Browse files Browse the repository at this point in the history
Reviewed-by: stuefe
  • Loading branch information
YaSuenag committed May 6, 2021
1 parent a86ee9b commit 0f9852c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/java.base/share/native/libverify/check_code.c
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1994, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1994, 2021, 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
Expand Down Expand Up @@ -3821,7 +3821,7 @@ signature_to_fieldtype(context_type *context,
assert(finish >= p);
length = (int)(finish - p);
if (length + 1 > (int)sizeof(buffer_space)) {
buffer = malloc(length + 1);
buffer = calloc(length + 1, sizeof(char));
check_and_push(context, buffer, VM_MALLOC_BLK);
}
memcpy(buffer, p, length);
Expand Down

1 comment on commit 0f9852c

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.