diff options
author | Austin Yuan <shengquan.yuan@intel.com> | 2009-02-01 11:54:54 -0500 |
---|---|---|
committer | Austin Yuan <shengquan.yuan@intel.com> | 2009-02-01 11:54:54 -0500 |
commit | a59133d8bdb2418b45f95279ff00146363701a64 (patch) | |
tree | 3665ed8bb9df3b8de6cb98e9422ef997f03fd972 /src/va.c | |
parent | 16a51b8c6c289211c3e991f06fbfb6c68d7ca19c (diff) |
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.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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); |