search for: strlcpy

Displaying 20 results from an estimated 543 matches for "strlcpy".

Did you mean: strcpy
2014 Jul 03
2
missing strlcpy fix (which klibc has)
Hi, The current strlcpy code in the Syslinux tree copies one byte too much. Basically, it misses something like the following klibc patch: http://git.kernel.org/cgit/libs/klibc/klibc.git/commit/klibc/strlcpy.c?id=4644bd92e21c7fd9a48dd8dfd0c4f8ef772843f0 As the current klibc may carries lots of other relevant fixes as wel...
2014 Jul 21
1
missing strlcpy fix (which klibc has)
Ady <ady-sf at hotmail.com> writes: >> The current strlcpy code in the Syslinux tree copies one byte too much. >> Basically, it misses something like the following klibc patch: >> http://git.kernel.org/cgit/libs/klibc/klibc.git/commit/klibc/strlcpy.c?id=4644bd92e21c7fd9a48dd8dfd0c4f8ef772843f0 >> >> As the current klibc may carries...
2005 Mar 26
0
fix broken strlcpy() strlcat()
Just another udev segfault. strlcpy() writes behind the specified maximum size. strlcat() causes the same probelem and truncates the destination string to the maximum size which isn't the job for a concatenation function. Thanks, Kay diff -Nru a/klibc/klibc/strlcat.c b/klibc/klibc/strlcat.c --- a/klibc/klibc/strlcat.c 2005-03-...
2016 Aug 24
6
[Bug 2608] New: Signed overflow in openbsd-compat/strlcpy.c
https://bugzilla.mindrot.org/show_bug.cgi?id=2608 Bug ID: 2608 Summary: Signed overflow in openbsd-compat/strlcpy.c Product: Portable OpenSSH Version: 7.3p1 Hardware: All OS: Linux Status: NEW Severity: enhancement Priority: P5 Component: Miscellaneous Assignee: unassigned-bugs at mindrot.org Reporter:...
2018 Jan 12
0
[PATCH] drm/nouveau/core/client: use strlcpy() instead of strncpy()
...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 deletion(-) diff --git a/drivers/gpu/drm/nouveau/nvif/client.c b/drivers/gpu/drm/nouveau/nvif/c...
2014 Jul 18
0
missing strlcpy fix (which klibc has)
> Hi, > > The current strlcpy code in the Syslinux tree copies one byte too much. > Basically, it misses something like the following klibc patch: > http://git.kernel.org/cgit/libs/klibc/klibc.git/commit/klibc/strlcpy.c?id=4644bd92e21c7fd9a48dd8dfd0c4f8ef772843f0 > > As the current klibc may carries lots of other r...
2006 Aug 24
1
[LLVMdev] strlcpy
The current CVS version doesn't compile on Linux: MachOWriter.h:583: error: 'strlcpy' was not declared in this scope Rafael
2018 Jul 13
0
[PATCH 04/18] nouveau: change strncpy+truncation to strlcpy
...rmware.c +++ b/drivers/gpu/drm/nouveau/nvkm/core/firmware.c @@ -40,8 +40,7 @@ nvkm_firmware_get(struct nvkm_device *device, const char *fwname, int i; /* Convert device name to lowercase */ - strncpy(cname, device->chip->name, sizeof(cname)); - cname[sizeof(cname) - 1] = '\0'; + strlcpy(cname, device->chip->name, sizeof(cname)); i = strlen(cname); while (i) { --i; -- 2.17.1
2000 Dec 01
3
two irix patches
...Thu Nov 9 22:28:31 2000 +++ openssh-SNAP-20001129/loginrec.c Thu Nov 30 13:52:24 2000 @@ -512,13 +512,8 @@ line_stripname(char *dst, const char *src, int dstsize) { memset(dst, '\0', dstsize); -#ifdef sgi - if (strncmp(src, "/dev/tty", 8) == 0) - strlcpy(dst, src + 8, dstsize); -#else if (strncmp(src, "/dev/", 5) == 0) strlcpy(dst, src + 5, dstsize); -#endif else strlcpy(dst, src, dstsize); return ds...
2015 Feb 10
0
[PATCH 3/6] gpllib: fix sizeof(char *) misuse
The code was passing sizeof(char *) - not the length of the buffer - to strlcpy and snprintf. Change the function to take the length of the buffer as a parameter. Fixes the warning: argument to 'sizeof' in 'snprintf' call is the same expression as the destination; did you mean to provide an explicit length? Signed-off-by: Jonathan Boeing <jonathan.n.boein...
2011 Apr 02
2
[patch] ~420 seconds in cpu_detect
...s, but could be cleaned up. OTOH, its trivial, and perhaps unlikely to be used again. the problem manifested in the commented out statement. its also worth noting that when offending code is restored, I get this value out Vendor : ?????????????????????????????????? with replacement code: strlcpy(cpu->model, c->x86_vendor_id, sizeof(cpu->vendor)); I get "" void set_generic_info(struct cpuinfo_x86 *c, s_cpu * cpu) { clock_t et = times(NULL); printf("sizeof(cpu->vendor): %d\n", sizeof(cpu->vendor)); printf("sizeof(cpu->model): %d\n&quot...
2011 Apr 02
2
[patch] ~420 seconds in cpu_detect
...s, but could be cleaned up. OTOH, its trivial, and perhaps unlikely to be used again. the problem manifested in the commented out statement. its also worth noting that when offending code is restored, I get this value out Vendor : ?????????????????????????????????? with replacement code: strlcpy(cpu->model, c->x86_vendor_id, sizeof(cpu->vendor)); I get "" void set_generic_info(struct cpuinfo_x86 *c, s_cpu * cpu) { clock_t et = times(NULL); printf("sizeof(cpu->vendor): %d\n", sizeof(cpu->vendor)); printf("sizeof(cpu->model): %d\n&quot...
2020 Nov 02
0
[PATCH mlx5-next v1 03/11] net/mlx5_core: Clean driver version and name
...a/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c > > +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c > > @@ -40,9 +40,7 @@ void mlx5e_ethtool_get_drvinfo(struct mlx5e_priv > > *priv, { > > struct mlx5_core_dev *mdev = priv->mdev; > > > > - strlcpy(drvinfo->driver, DRIVER_NAME, sizeof(drvinfo->driver)); > > - strlcpy(drvinfo->version, DRIVER_VERSION, > > - sizeof(drvinfo->version)); > > + strlcpy(drvinfo->driver, KBUILD_MODNAME, sizeof(drvinfo- > > >driver)); > > snprintf(drvinfo->fw_versi...
2016 Jan 13
2
Possible failure to scrub data in file 'openbsd-compat/bsd-cray.c' in OpenSSH-7.1p1
...;bsd-cray.c', I found a possible issue where data in the following code may not be properly scrubbed in the case IA_BACKDOOR in function 'cray_setup', which is below: case IA_BACKDOOR: /* XXX: can we memset it to zero here so save some of this */ strlcpy(ue.ue_name, "root", sizeof(ue.ue_name)); strlcpy(ue.ue_dir, "/", sizeof(ue.ue_dir)); strlcpy(ue.ue_shell, "/bin/sh", sizeof(ue.ue_shell)); ue.ue_passwd[0] = '\0'; ue.ue_age[0] = '\0';...
2016 Jul 08
6
[PATCH v3 0/7] lib: string: add functions to case-convert strings
...e previous version of this series[1] and the use cases found in the kernel, it does look like having several flavours of case conversion functions is beneficial. The use cases fall into three categories: - copying a string and converting the case while specifying a maximum length to mimic strlcpy() - copying a string and converting the case without specifying a length to mimic strcpy() - converting the case of a string in-place (i.e. modifying the string that was passed in) Consequently, I am proposing these new functions: void strlcpytoupper(char *dst, const char *...
2011 Feb 24
1
osx 10.6 strange rsync errors
...around the problem pretty well. Thanks Ira ( Look for "Modified Code" so see my change ) int get_tmpname(char *fnametmp, const char *fname) { int maxname, added, length = 0; const char *f; if (tmpdir) { /* Note: this can't overflow, so the return value is safe */ length = strlcpy(fnametmp, tmpdir, MAXPATHLEN - 2); fnametmp[length++] = '/'; } if ((f = strrchr(fname, '/')) != NULL) { ++f; if (!tmpdir) { length = f - fname; /* copy up to and including the slash */ strlcpy(fnametmp, fname, length + 1); } } else f = fname; // Modified C...
2000 Jun 13
2
Openssh-2.1.1p1 and solaris 7/8
Hello, I just installed the above openssh onto a Sun Solaris 7 and Solaris 8 system. No problem with that. However, I now seem to get some rubbish processed when I login with slogin. An example: Last login: Tue Jun 13 12:31:27 2000 from jhorne.csd.plymo:tJ` ^[[?1;2c Telnet logs in okay, but just shows 'Last login...jhorne.csd.plymo'. This seems to get passed to the shell, which it of
2010 May 12
8
[Bug 1770] New: circular dependencies prevent building on platforms without strlcpy, vasprintf
https://bugzilla.mindrot.org/show_bug.cgi?id=1770 Summary: circular dependencies prevent building on platforms without strlcpy, vasprintf Product: Portable OpenSSH Version: 5.5p1 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: Build system AssignedTo: unassigned-bugs at mindrot.org ReportedBy:...
2003 Oct 30
1
Patch to make sshd work on multihomed systems
...+72,23 @@ #endif krb5_error_code problem; krb5_ccache ccache = NULL; + char localname[MAXHOSTNAMELEN]; + char *socketname; if (authctxt->pw == NULL) return (0); temporarily_use_uid(authctxt->pw); + socketname = get_local_name(packet_get_connection_in()); + if (socketname) { + strlcpy(localname, socketname, MAXHOSTNAMELEN); + xfree(socketname); + } else if (gethostname(localname, MAXHOSTNAMELEN)) { + problem = -1; + goto out; + } + problem = krb5_init(authctxt); if (problem) goto out; @@ -123,7 +135,7 @@ if (problem) goto out; - problem = krb5_sname_to_principal(...
2000 Dec 27
2
patch to support hurd-i386
...@@ -97,7 +109,7 @@ hints.ai_socktype = SOCK_STREAM; if (getaddrinfo(name, NULL, &hints, &aitop) != 0) { log("reverse mapping checking getaddrinfo for %.700s failed - POSSIBLE BREAKIN ATTEMPT!", name); - strlcpy(name, ntop, sizeof name); + strlcpy(name, ntop, name_size); goto check_ip_options; } /* Look for the address from the list of addresses. */ @@ -113,13 +125,13 @@ /* Address not found for the host n...