Skip to content

Commit c26cf5b

Browse files
Jan KratochvilGoeLin
authored andcommitted
8355077: Compiler error at splashscreen_gif.c due to unterminated string initialization
Backport-of: 898d4798003d7b9cd54ef3a149eb037998a39887
1 parent 8912faa commit c26cf5b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/java.desktop/share/native/libsplashscreen/splashscreen_gif.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2005, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -48,7 +48,7 @@
4848
// restore the area overwritten by the graphic with
4949
// what was there prior to rendering the graphic.
5050

51-
static const char szNetscape20ext[11] = "NETSCAPE2.0";
51+
static const char szNetscape20ext[] = "NETSCAPE2.0";
5252

5353
#define NSEXT_LOOP 0x01 // Loop Count field code
5454

@@ -181,7 +181,7 @@ SplashDecodeGif(Splash * splash, GifFileType * gif)
181181
}
182182
case APPLICATION_EXT_FUNC_CODE:
183183
{
184-
if (size == sizeof(szNetscape20ext)
184+
if (size == strlen(szNetscape20ext)
185185
&& memcmp(pExtension, szNetscape20ext, size) == 0) {
186186
int iSubCode;
187187

0 commit comments

Comments
 (0)