Displaying 20 results from an estimated 492 matches for "strncpy".
Did you mean:
strcpy
2004 Apr 14
5
[LLVMdev] Linking strncpy
...orks correctly_.
The only odd thing is when I recompile with GCC, I see these messages:
pal3.c:195: warning: conflicting types for built-in function `strcmp'
pal3.c:200: warning: conflicting types for built-in function `memcpy'
pal3.c:202: warning: conflicting types for built-in function `strncpy'
The lines referenced are:
int strcmp(signed char *, signed char *);
signed char *memcpy(signed char *, signed char *, unsigned );
signed char *strncpy(signed char *, signed char *, unsigned );
Do you have any insight into what's happening? Thanks,
-Eric
----- Forwarded message from Chr...
2004 Apr 14
0
[LLVMdev] Linking strncpy
The only thing I can think of is that string.h is being #included and
has different signatures for memcpy and strncpy. Possibly "char" is not
signed on your machine (very unusual) or some of the parameters are
declared as "const".
Reid.
On Wed, 2004-04-14 at 18:19, Eric Zimmerman wrote:
> Chris,
>
> I'm fine with using JIT, but I'm trying to understand this problem:
> 1....
2004 Apr 14
1
[LLVMdev] Linking strncpy
...iving incorrect results; however, if I disassemble the
LLVM bytecode and recompile with GCC, everything works fine.
I encountered the following error when running lli with
'-force-interpreter' option:
"Tried to execute an unknown external function: sbyte * (sbyte
*, sbyte *, uint) * strncpy"
Strncpy is used as part of my compiler's run-time library, and it was
compiled with the C-frontend for LLVM. Looking at the assembly, the
function is declared at the top of the file;
declare sbyte* %strncpy(sbyte*,sbyte*,uint) ;; __builtin_strncpy
And it is called like this:
%tmp.12...
2020 Feb 18
1
install_prereq install-unpackaged fails on Debian Buster
...Makefile
A nbs-trunk/nbscat8k
A nbs-trunk/xmms-nbs-1.2.10.patch
A nbs-trunk/xmms-nbs-orig.patch
Révision 15 extraite.
cc -g -Wall -O2 -D_NBS_PRIVATE -Wmissing-prototypes -Werror
-Wno-pointer-sign -D_REENTRANT -c -o nbsd.o nbsd.c
nbsd.c: In function ‘handle_network’:
nbsd.c:453:5: error: ‘strncpy’ output may be truncated copying 79 bytes
from a string of length 79 [-Werror=stringop-truncation]
strncpy(ns->name, si->streamname, sizeof(ns->name) - 1);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
nbsd.c:454:5: error: ‘strncpy’ output may be truncated copying 15 by...
2004 Apr 14
2
[LLVMdev] Linking strncpy
On Wed, 14 Apr 2004, Reid Spencer wrote:
> The only thing I can think of is that string.h is being #included and
> has different signatures for memcpy and strncpy. Possibly "char" is not
> signed on your machine (very unusual) or some of the parameters are
> declared as "const".
The problem is that the code generated by the C backend cannot include any
system headers. If the system header were to have a #define (not a rare
occuran...
2004 Apr 15
0
[LLVMdev] Linking strncpy
...e only odd thing is when I recompile with GCC, I see these messages:
>
> pal3.c:195: warning: conflicting types for built-in function `strcmp'
> pal3.c:200: warning: conflicting types for built-in function `memcpy'
> pal3.c:202: warning: conflicting types for built-in function `strncpy'
>
> The lines referenced are:
> int strcmp(signed char *, signed char *);
> signed char *memcpy(signed char *, signed char *, unsigned );
> signed char *strncpy(signed char *, signed char *, unsigned );
>
> Do you have any insight into what's happening? Thanks,
The...
2008 Apr 25
2
Bug in R 2.7 for over long lines (crasher+proposed fix!) (PR#11281)
...g is in ./src/main/gram.c line 3038:
>=20
> } else { /* over-long line */
> fixthis --> char *LongLine =3D (char *) malloc(nc);
> if(!LongLine)
> error(_("unable to allocate space for source line %
d"), xxlineno);
> strncpy(LongLine, (char *)p0, nc);
> bug --> LongLine[nc] =3D '\0';
> SET_STRING_ELT(source, lines++,
> mkChar2((char *)LongLine));
> free(LongLine);
>=20
> note that LongLine is only nc chars long, so the LongLine[nc]=3D'\...
2013 Dec 03
1
[LLVMdev] Help with creating and replacing instructions in LLVM
Hi,
I have the following instruction in my IR-
%call2 = call i8* @strcpy(i8* %1, i8* %2) #2
I intend to change call to strcpy with strncpy. I have included the following code in runOnFunction, so that when it is strcpy's turn to be invoked, strncpy is invoked instead.
Assuming I* is the strcpy instruction,
CallInst* x=new CallInst::CreateCall3(strncpy,1,2,ConstantInt(16),llvm::Twine("my_strncpy"));
ReplaceInstWithInst(...
2009 Mar 31
0
enhanced config.c32 module
...x[255];
bool extlinux_param;
bool isolinux_param;
bool pxelinux_param;
bool syslinux_param;
const struct syslinux_version *sv;
/*
* Detect which variant of syslinux is running.
*/
int detect_syslinux()
{
sv = syslinux_version();
switch (sv->filesystem) {
case SYSLINUX_FS_EXTLINUX:
strncpy(bootlinux,extlinux,sizeof(bootlinux));
extlinux_param=true;
break;
case SYSLINUX_FS_ISOLINUX:
strncpy(bootlinux,isolinux,sizeof(bootlinux));
isolinux_param=true;
break;
case SYSLINUX_FS_PXELINUX:
strncpy(bootlinux,pxelinux,sizeof(bootlinux));
pxelinux_param=t...
2018 Apr 05
1
[nbdkit PATCH] nbd: Fix gcc warning and off-by-one in socket name length
gcc 8 gripes (when using './configure --enable-gcc-warnings'):
nbd.c: In function 'nbd_open':
nbd.c:470:3: error: 'strncpy' specified bound 108 equals destination size [-Werror=stringop-truncation] strncpy (sock.sun_path, sockname, sizeof (sock.sun_path));
The warning is a false positive, given that we currently reject
names >= sizeof(sock.sun_path), and thus we are only ever copying
in a name that will include...
2011 Feb 07
18
[PATCH] Btrfs-progs use safe string manipulation functions
Please find the attached patch which replace unsafe strcpy(3) by
strncpy(3) functions.
regards,
Eduardo Silva
2008 Apr 25
1
Bug in R 2.7 for over long lines
...swig might actually work):
the bug is in ./src/main/gram.c line 3038:
} else { /* over-long line */
fixthis --> char *LongLine = (char *) malloc(nc);
if(!LongLine)
error(_("unable to allocate space for source line %d"), xxlineno);
strncpy(LongLine, (char *)p0, nc);
bug --> LongLine[nc] = '\0';
SET_STRING_ELT(source, lines++,
mkChar2((char *)LongLine));
free(LongLine);
note that LongLine is only nc chars long, so the LongLine[nc]='\0' might
be an out of bounds wri...
2013 Dec 03
1
[LLVMdev] Help needed with creating new and replacing an old instruction
Hi,I have the following instruction in my IR-%call2 = call i8* @strcpy(i8* %1, i8* %2) #2I intend to change call to strcpy with strncpy. I have included the following code in runOnFunction, so that when it is strcpy's turn to be invoked, strncpy is invoked instead.Assuming I* is the strcpy instruction,CallInst* x=new CallInst::CreateCall3(strncpy,1,2,ConstantInt(16),"my_strncpy");ReplaceInstWithInst(I*,x);I'm runn...
2018 Jan 12
0
[PATCH] drm/nouveau/core/client: use strlcpy() instead of strncpy()
From: Xiongfeng Wang <xiongfeng.wang at linaro.org>
gcc-8 reports
drivers/gpu/drm/nouveau/nvif/client.c: In function 'nvif_client_init':
./include/linux/string.h:245:9: warning: '__builtin_strncpy' specified
bound 32 equals destination size [-Wstringop-truncation]
We need to use strlcpy() to make sure the dest string is nul-terminated.
Signed-off-by: Xiongfeng Wang <xiongfeng.wang at linaro.org>
---
drivers/gpu/drm/nouveau/nvif/client.c | 2 +-
1 file changed, 1 insertion(+), 1...
2018 Jul 13
0
[PATCH 04/18] nouveau: change strncpy+truncation to strlcpy
Generated by scripts/coccinelle/misc/strncpy_truncation.cocci
Signed-off-by: Dominique Martinet <asmadeus at codewreck.org>
---
Please see https://marc.info/?l=linux-kernel&m=153144450722324&w=2 (the
first patch of the serie) for the motivation behind this patch
drivers/gpu/drm/nouveau/nvkm/core/firmware.c | 3 +--
1 file ch...
2007 Sep 19
0
Patch to replace strndup with malloc/strncpy for the ini plugin
Hi,
I am the maintainer for the compiz port on FreeBSD. We do not have
strndup, so this patch replaces one other instance of strndup.
thanks,
robert.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Replace-strndup-with-malloc-and-strncpy.-FreeBSD-do.patch
Type: application/mbox
Size: 1671 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/compiz/attachments/20070919/8acb410d/attachment.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-sign...
2005 Aug 25
2
Custom Application For Asterisk
...=tds_process_row_tokens(tds, &rowtype, &computeid))==TDS_SUCCEED) {
for (i=0; i<tds->res_info->num_cols; i++) {
value = ((tds->res_info->current_row) + (tds->res_info->columns[i]->column_offset));
memset(resulttype, 0, sizeof(resulttype));
strncpy(resulttype, (const char *) value, 3);
memset(myretnumber, 0, sizeof(myretnumber));
strncpy(myretnumber, (const char *) (value+4), strlen((const char *) value)-4);
}
}
if(!strcmp(resulttype,"NEW")){
sprintf(mysqlcmd, "Execute MyStoredProc \'%s\&...
2006 Jul 12
2
[PATCH] HVM SMBIOS v2 0/5
...Differences include
(1) SMBIOS is no longer optional for HVM domU''s.
(2) The refactoring I did of hvmloader wasn''t really necessary, so I
got rid of it.
(3) The patches have been tested on changeset
10671:b20580cf7fc1bfe5119597bb5b576cdd020551d5
(4) The versions of strcpy() and strncpy() I wrote in util.c now
behave properly: strncpy() pads the destination string with NULs until
its size limit is reached and both strcpy() and strncpy() return the
address of the destination string.
Peace.
Andrew
_______________________________________________
Xen-devel mailing list
Xen-devel@li...
2008 May 10
0
Bug in R 2.7 for over long lines (crasher+proposed fix!) (PR#11438)
...r-long line */
> >> fixthis --> char *LongLine =3D (char *) malloc(nc);
> >> if(!LongLine)
> >> error(_("unable to allocate space for source line %
> >>
> > d"), xxlineno);
> >
> >> strncpy(LongLine, (char *)p0, nc);
> >> bug --> LongLine[nc] =3D '\0';
> >> SET_STRING_ELT(source, lines++,
> >> mkChar2((char *)LongLine));
> >> free(LongLine);
> >> =20
> >> note that LongL...
2008 Oct 15
1
error installing gtools (PR#13168)
...ize=4 -m64 -mtune=generic -c setTCPNoDelay.c -o
setTCPNoDelay.o
setTCPNoDelay.c:1:15: error: R.h: No such file or directory
setTCPNoDelay.c:2:24: error: Rinternals.h: No such file or directory
setTCPNoDelay.c: In function ?checkStatus?:
setTCPNoDelay.c:66: warning: implicit declaration of function ?strncpy?
setTCPNoDelay.c:66: warning: incompatible implicit declaration of built-in
function ?strncpy?
setTCPNoDelay.c:72: warning: implicit declaration of function ?strerror?
setTCPNoDelay.c:72: warning: passing argument 2 of ?strncpy? makes pointer from
integer without a cast
make: *** [setTCPNoDelay.o]...