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
Backport-of: 0f9852c
  • Loading branch information
Paul Hohensee committed Dec 6, 2021
1 parent c82d66c commit 3a452af
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, 2016, 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 @@ -3830,7 +3830,7 @@ signature_to_fieldtype(context_type *context,
}
length = 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 3a452af

@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.