summaryrefslogtreecommitdiff
path: root/src/va.c
diff options
context:
space:
mode:
authorAustin Yuan <shengquan.yuan@intel.com>2009-02-01 11:54:54 -0500
committerAustin Yuan <shengquan.yuan@intel.com>2009-02-01 11:54:54 -0500
commita59133d8bdb2418b45f95279ff00146363701a64 (patch)
tree3665ed8bb9df3b8de6cb98e9422ef997f03fd972 /src/va.c
parent16a51b8c6c289211c3e991f06fbfb6c68d7ca19c (diff)
downloadlibva-a59133d8bdb2418b45f95279ff00146363701a64.tar.gz
Fixed issues reported by Klockwork
Signed-off-by: Austin Yuan <shengquan.yuan@intel.com>
Diffstat (limited to 'src/va.c')
-rw-r--r--src/va.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/va.c b/src/va.c
index 2bfeb49..d5aed08 100644
--- a/src/va.c
+++ b/src/va.c
@@ -143,10 +143,10 @@ static VAStatus va_openDriver(VADisplay dpy, char *driver_name)
char *driver_path = (char *) malloc( strlen(driver_dir) +
strlen(driver_name) +
strlen(DRIVER_EXTENSION) + 2 );
- strcpy( driver_path, driver_dir );
- strcat( driver_path, "/" );
- strcat( driver_path, driver_name );
- strcat( driver_path, DRIVER_EXTENSION );
+ strncpy( driver_path, driver_dir, strlen(driver_dir) );
+ strncat( driver_path, "/", strlen("/") );
+ strncat( driver_path, driver_name, strlen(driver_name) );
+ strncat( driver_path, DRIVER_EXTENSION, strlen(DRIVER_EXTENSION) );
va_infoMessage("Trying to open %s\n", driver_path);