From 8db4bc129834f8886df2ade55c82badd3f5051a3 Mon Sep 17 00:00:00 2001 From: Sergey Bylokhov Date: Fri, 10 Jan 2014 19:45:41 +0400 Subject: [PATCH] 8029730: Improve audio device additions Reviewed-by: prr, mschoene --- .../native/com/sun/media/sound/PLATFORM_API_SolarisOS_Utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jdk/src/solaris/native/com/sun/media/sound/PLATFORM_API_SolarisOS_Utils.c b/jdk/src/solaris/native/com/sun/media/sound/PLATFORM_API_SolarisOS_Utils.c index 8b9601f51cf..f5da85aa163 100644 --- a/jdk/src/solaris/native/com/sun/media/sound/PLATFORM_API_SolarisOS_Utils.c +++ b/jdk/src/solaris/native/com/sun/media/sound/PLATFORM_API_SolarisOS_Utils.c @@ -76,7 +76,7 @@ int addAudioDevice(char* path, AudioDevicePath* adPath, int* count) { adPath[*count].st_ino = statBuf.st_ino; adPath[*count].st_dev = statBuf.st_dev; strncpy(adPath[*count].path, path, MAX_NAME_LENGTH); - adPath[*count].path[MAX_NAME_LENGTH] = 0; + adPath[*count].path[MAX_NAME_LENGTH - 1] = 0; (*count)++; TRACE1("Added audio device %s\n", path); }