summaryrefslogtreecommitdiffstats
path: root/source/lib/kanji.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>1998-05-12 00:55:32 +0000
committerJeremy Allison <jra@samba.org>1998-05-12 00:55:32 +0000
commit2d774454005f0b54e5684cf618da7060594dfcbb (patch)
treed3e7831d1d5eb0cc21a78dadb51d63a82c269d2d /source/lib/kanji.c
parentc760ebbf127796427c4602aae61952df938c6def (diff)
downloadsamba-2d774454005f0b54e5684cf618da7060594dfcbb.tar.gz
samba-2d774454005f0b54e5684cf618da7060594dfcbb.tar.xz
samba-2d774454005f0b54e5684cf618da7060594dfcbb.zip
This is a security audit change of the main source.
It removed all ocurrences of the following functions : sprintf strcpy strcat The replacements are slprintf, safe_strcpy and safe_strcat. It should not be possible to use code in Samba that uses sprintf, strcpy or strcat, only the safe_equivalents. Once Andrew has fixed the slprintf implementation then this code will be moved back to the 1.9.18 code stream. Jeremy.
Diffstat (limited to 'source/lib/kanji.c')
-rw-r--r--source/lib/kanji.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/source/lib/kanji.c b/source/lib/kanji.c
index 401e91e5349..afe255d36a4 100644
--- a/source/lib/kanji.c
+++ b/source/lib/kanji.c
@@ -419,7 +419,7 @@ static char *sj_to_euc(char *from, BOOL overwrite)
}
*out = 0;
if (overwrite) {
- strcpy((char *) save, (char *) cvtbuf);
+ pstrcpy((char *) save, (char *) cvtbuf);
return (char *) save;
} else {
return cvtbuf;
@@ -451,7 +451,7 @@ static char *euc_to_sj(char *from, BOOL overwrite)
}
*out = 0;
if (overwrite) {
- strcpy(save, (char *) cvtbuf);
+ pstrcpy(save, (char *) cvtbuf);
return save;
} else {
return cvtbuf;
@@ -522,7 +522,7 @@ static char *jis8_to_sj(char *from, BOOL overwrite)
}
*out = 0;
if (overwrite) {
- strcpy (save, (char *) cvtbuf);
+ pstrcpy (save, (char *) cvtbuf);
return save;
} else {
return cvtbuf;
@@ -578,7 +578,7 @@ static char *sj_to_jis8(char *from, BOOL overwrite)
}
*out = 0;
if (overwrite) {
- strcpy (save, (char *) cvtbuf);
+ pstrcpy (save, (char *) cvtbuf);
return save;
} else {
return cvtbuf;
@@ -637,7 +637,7 @@ static char *jis7_to_sj(char *from, BOOL overwrite)
}
*out = 0;
if (overwrite) {
- strcpy (save, (char *) cvtbuf);
+ pstrcpy (save, (char *) cvtbuf);
return save;
} else {
return cvtbuf;
@@ -713,7 +713,7 @@ static char *sj_to_jis7(char *from, BOOL overwrite)
}
*out = 0;
if (overwrite) {
- strcpy (save, (char *) cvtbuf);
+ pstrcpy (save, (char *) cvtbuf);
return save;
} else {
return cvtbuf;
@@ -769,7 +769,7 @@ static char *junet_to_sj(char *from, BOOL overwrite)
}
*out = 0;
if (overwrite) {
- strcpy (save, (char *) cvtbuf);
+ pstrcpy (save, (char *) cvtbuf);
return save;
} else {
return cvtbuf;
@@ -838,7 +838,7 @@ static char *sj_to_junet(char *from, BOOL overwrite)
}
*out = 0;
if (overwrite) {
- strcpy (save, (char *) cvtbuf);
+ pstrcpy (save, (char *) cvtbuf);
return save;
} else {
return cvtbuf;
@@ -864,7 +864,7 @@ static char *hex_to_sj(char *from, BOOL overwrite)
}
*dp = '\0';
if (overwrite) {
- strcpy ((char *) from, (char *) cvtbuf);
+ pstrcpy ((char *) from, (char *) cvtbuf);
return (char *) from;
} else {
return cvtbuf;
@@ -900,7 +900,7 @@ static char *sj_to_hex(char *from, BOOL overwrite)
}
*dp = '\0';
if (overwrite) {
- strcpy ((char *) from, (char *) cvtbuf);
+ pstrcpy ((char *) from, (char *) cvtbuf);
return (char *) from;
} else {
return cvtbuf;
@@ -932,7 +932,7 @@ static char *cap_to_sj(char *from, BOOL overwrite)
}
*dp = '\0';
if (overwrite) {
- strcpy ((char *) from, (char *) cvtbuf);
+ pstrcpy ((char *) from, (char *) cvtbuf);
return (char *) from;
} else {
return cvtbuf;
@@ -960,7 +960,7 @@ static char *sj_to_cap(char *from, BOOL overwrite)
}
*dp = '\0';
if (overwrite) {
- strcpy ((char *) from, (char *) cvtbuf);
+ pstrcpy ((char *) from, (char *) cvtbuf);
return (char *) from;
} else {
return cvtbuf;
@@ -973,7 +973,7 @@ static char *sj_to_cap(char *from, BOOL overwrite)
static char *sj_to_sj(char *from, BOOL overwrite)
{
if (!overwrite) {
- strcpy (cvtbuf, (char *) from);
+ pstrcpy (cvtbuf, (char *) from);
return cvtbuf;
} else {
return (char *) from;