Skip to content
Permalink
Browse files
8266168: -Wmaybe-uninitialized happens in check_code.c
Reviewed-by: stuefe
  • Loading branch information
YaSuenag committed May 6, 2021
1 parent a86ee9b commit 0f9852c63b12c43b52615ea003a4fc1d69ad3ada
Showing with 2 additions and 2 deletions.
  1. +2 −2 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
@@ -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);

0 comments on commit 0f9852c

Please sign in to comment.