summaryrefslogtreecommitdiff
path: root/soltools/checkdll
diff options
context:
space:
mode:
authorVladimir Glazounov <vg@openoffice.org>2005-03-11 09:05:12 +0000
committerVladimir Glazounov <vg@openoffice.org>2005-03-11 09:05:12 +0000
commit5067b902f05aa94205605469a82ad565c2c52194 (patch)
tree2fc0deddf6b98a403c9363159e74d686bf7aade4 /soltools/checkdll
parentbe7dcd51e102e89c3f00bf796a5919bcf623235c (diff)
INTEGRATION: CWS hr12 (1.6.76); FILE MERGED
2005/02/15 14:17:55 hr 1.6.76.1: #105901#: replace strcpy() and strcat() with strncpy() and strncat()
Diffstat (limited to 'soltools/checkdll')
-rw-r--r--soltools/checkdll/checkdll.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/soltools/checkdll/checkdll.c b/soltools/checkdll/checkdll.c
index bfa1da623651..114338596650 100644
--- a/soltools/checkdll/checkdll.c
+++ b/soltools/checkdll/checkdll.c
@@ -2,9 +2,9 @@
*
* $RCSfile: checkdll.c,v $
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: mh $ $Date: 2003-07-17 10:26:34 $
+ * last change: $Author: vg $ $Date: 2005-03-11 10:05:12 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -120,11 +120,12 @@ int main(int argc, char *argv[])
}
if (pLib) {
// Prefix symbol name with '_'
- char *name = malloc(1+strlen(psymbol)+1);
+ int len = strlen(psymbol);
+ char *name = malloc(1+len+1);
NSSymbol *symbol;
void *address = NULL;
- strcpy(name, "_");
- strcat(name, psymbol);
+ strncpy(name, "_", 2);
+ strncat(name, psymbol, len);
symbol = NSLookupSymbolInImage(pLib, name, NSLOOKUPSYMBOLINIMAGE_OPTION_BIND);
free(name);
if (symbol) address = NSAddressOfSymbol(symbol);