Displaying 20 results from an estimated 191 matches for "strlcat".
Did you mean:
strcat
2015 Oct 13
2
wrong strlcat limit value in realpath.c
In realpath.c at line 182
left_len = strlcat(symlink, left, sizeof(left));
should be
left_len = strlcat(symlink, left, sizeof(symlink));
It's a benign issue because both arrays are the same size. And I can't
imagine that ever changing. But it's inconsistent, not to mention throwing
compiler warnings on OS X.
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-27 04:40:42 +02:00
+++ b/klibc/klibc/strlcat.c 2005-...
2016 Jan 19
6
FWD: [patch] scp + UTF-8
...uf + strlen(buf), win_size - strlen(buf),
+ snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf),
" %3d%% ", percent);
/* amount transferred */
- format_size(buf + strlen(buf), win_size - strlen(buf),
+ format_size(buf + strlen(buf), sizeof(buf) - strlen(buf),
cur_pos);
- strlcat(buf, " ", win_size);
+ strlcat(buf, " ", sizeof(buf));
/* bandwidth usage */
- format_rate(buf + strlen(buf), win_size - strlen(buf),
+ format_rate(buf + strlen(buf), sizeof(buf) - strlen(buf),
(off_t)bytes_per_second);
- strlcat(buf, "/s ", win_size);
+ strl...
2009 Oct 25
0
alternate output for progressmeter
...printf(buf, file_len + 1, (progresstype)?"progress %s
:":"\r%s", file);
? ? ? ? ? ? ? ?if (len < 0)
? ? ? ? ? ? ? ? ? ? ? ?len = 0;
? ? ? ? ? ? ? ?if (len >= file_len + 1)
@@ -195,7 +198,7 @@
? ? ? ? ? ? ? ?stalled = 0;
? ? ? ?if (stalled >= STALL_TIME)
- ? ? ? ? ? ? ? strlcat(buf, "- stalled -", win_size);
+ ? ? ? ? ? ? ? strlcat(buf, (progresstype)?"-stalled-":"- stalled -",
win_size);
? ? ? ?else if (bytes_per_second == 0 && bytes_left)
? ? ? ? ? ? ? ?strlcat(buf, " ?--:-- ETA", win_size);
? ? ? ?else {
@@ -219,10 +222,1...
2002 Feb 19
1
rsync bug in clean_flist() while removing duplicted names
...y priority list, that on duplicated files
the latest list wins. if this behaviour of rsync would change in future,
i'd run into deep problems..
the next problem i run into while testing my fixes on my debian woody
-where i compiled rsync 2.3.2 from the package pool with debuild- was,
that the strlcat() function in lib/compat.c was used.
from senfile.c strlcat() was called:
strlcat(fname,f_name(file),MAXPATHLEN);
but f_name(file) returned (char *) 0. now strlcat() did a strlen on a
nullpointer, and was not very happy.
now, everything works fine. but it may be worth to check if it's ok tha...
2001 Jul 25
1
[PATCH]: sftp: Avoid paths beginning with "//"
...===========================
RCS file: /cvs/openssh_cvs/sftp-int.c,v
retrieving revision 1.27
diff -u -p -r1.27 sftp-int.c
--- sftp-int.c 2001/07/14 02:19:37 1.27
+++ sftp-int.c 2001/07/25 08:44:29
@@ -204,7 +204,8 @@ path_append(char *p1, char *p2)
ret = xmalloc(len);
strlcpy(ret, p1, len);
- strlcat(ret, "/", len);
+ if (strcmp(p1, "/") != 0)
+ strlcat(ret, "/", len);
strlcat(ret, p2, len);
return(ret);
Index: sftp-server.c
===================================================================
RCS file: /cvs/openssh_cvs/sftp-server.c,v
retrieving revision 1.3...
2001 Jun 07
0
Patch for systems with no setreuid()
...fo getrlimit getrusage getttyent getusershell glob inet_aton inet_ntoa inet_ntop innetgr login_getcapbool md5_crypt memmove mkdtemp on_exit openpty realpath rresvport_af setdtablesize setenv setegid seteuid setlogin setproctitle setresgid setreuid setrlimit setsid sigaction sigvec snprintf strerror strlcat strlcpy strmode strsep strtok_r sysconf tcgetpgrp utimes vsnprintf vhangup vis waitpid _getpty __b64_ntop
+for ac_func in arc4random atexit b64_ntop bcopy bindresvport_sa clock fchown fchmod freeaddrinfo futimes gai_strerror getcwd getaddrinfo getgrouplist getnameinfo getrlimit getrusage getttyent...
2014 Jan 01
0
Soft chroot jail for sftp-server
...(*child == '/') {
> child++;
> child_len--;
> }
>
> char* cat;
> if (*(parent + parent_len - 1) == '/') {
> size_t cat_len = sizeof(char) * (parent_len + child_len + 1);
> cat = xmalloc(sizeof(char) * cat_len);
> *cat = '\0';
> strlcat(cat,parent,cat_len);
> strlcat(cat,child,cat_len);
> return cat;
> } else {
> size_t cat_len = sizeof(char) * (parent_len + child_len + 2);
> cat = xmalloc(sizeof(char) * cat_len);
> *cat = '\0';
> strlcat(cat,parent,cat_len);
> strlcat(cat,"/&quo...
2002 Feb 07
1
Latest version of the batch mode cleanup patch
...delta;
+static int fdb_open;
+static int fdb_close;
void write_batch_flist_file(char *buff, int bytes_to_write)
{
+ char filename[MAXPATHLEN];
if (fdb_open) {
/* Set up file extension */
- strcat(rsync_flist_file, batch_file_ext);
+ strlcpy(filename, batch_prefix, sizeof(filename));
+ strlcat(filename, rsync_flist_file, sizeof(filename));
- /* Open batch flist file for writing; create it if it doesn't exist */
- fdb =
- do_open(rsync_flist_file, O_WRONLY | O_CREAT | O_TRUNC,
+ /*
+ * Open batch flist file for writing;
+ * create it if it doesn't exist
+ */
+ fdb...
2007 Nov 14
1
libwrap-ing IMAP and POP logins
...t remote_port, local_port;
struct client *client;
int fd;
+#ifdef LIBWRAP
+ struct request_info req;
+ char daemon[13] = "dovecot-";
+#endif
fd = net_accept(LOGIN_LISTEN_FD, &remote_ip, &remote_port);
if (fd < 0) {
@@ -77,6 +88,17 @@
return;
}
+#ifdef LIBWRAP
+ strlcat(daemon, login_protocol, sizeof(daemon));
+ request_init(&req, RQ_DAEMON, daemon, RQ_FILE, fd, NULL);
+ fromhost(&req);
+ if (!hosts_access(&req)) {
+ i_info("libwrap: access denied");
+ net_disconnect(fd);
+ return;
+ }
+#endif
+
if (net_getsockname(fd, &local_ip, &am...
1999 Nov 22
0
ANNOUNCE: 1.2pre14
...22
- Make <enter> close gnome-ssh-askpass (Debian bug #50299)
- OpenBSD CVS Changes
- [ssh-keygen.c]
don't create ~/.ssh only if the user wants to store the private
key there. show fingerprint instead of public-key after
keygeneration. ok niels@
- Added OpenBSD bsd-strlcat.c, created bsd-strlcat.h
- Added timersub() macro
- Tidy RCSIDs of bsd-*.c
- Added autoconf test and macro to deal with old PAM libraries
pam_strerror definition (one arg vs two).
- Fix EGD problems (Thanks to Ben Taylor <bent at clark.net>)
- Retry /dev/urandom reads interrupted by...
1999 Dec 01
1
Compile bugs in openssh-1.2pre15 on Solaris (2.6)
...all: $(OBJS) $(TARGETS)
! libssh.a: authfd.o authfile.o bufaux.o buffer.o canohost.o channels.o
cipher.o compat.o compress.o crc32.o deattack.o hostfile.o match.o
mpaux.o nchan.o packet.o readpass.o rsa.o tildexpand.o ttymodes.o
uidswap.o xmalloc.o helper.o rc4.o bsd-mktemp.o bsd-strlcpy.o
bsd-strlcat.o log.o fingerprint.o
$(AR) rv $@ $^
$(RANLIB) $@
--- 34,40 ----
all: $(OBJS) $(TARGETS)
! libssh.a: authfd.o authfile.o bufaux.o buffer.o canohost.o channels.o
cipher.o compat.o compress.o crc32.o deattack.o hostfile.o match.o
mpaux.o nchan.o packet.o readpass.o rsa.o tildexpa...
2017 Mar 04
6
[Bug 2688] New: Long log messages to stderr missing newlines
...'AAAA...debug2: key not found
Notice multiple debug2 messages all on the same line. Each log line
should with with a newline character.
Suggested Fix
Since the intent is to append "\r\n" to fmtbuf before writing to
stderr, maybe it would be better to make that intent clearer using
strlcat() rather than snprintf().
msgbuf[0] = '\0';
(void)strlcat(msgbuf, fmtbuf, sizeof msgbuf - 2);
(void)strlcat(msgbuf, "\r\n", sizeof msgbuf );
--
You are receiving this mail because:
You are watching the assignee of the bug.
2001 Sep 28
3
openssh-2.9p2, short hostnames
For systems where the local hostname is obtained as a short name without
domain, there should be a ssh_config option "DefaultDomain" as in ssh-3.x
from ssh.com.
For the server, there might be a corresponding option in order to strip
the domain name from the remote client name (if it matches the server's
DefaultDomain) for use in auth_rhost2, since netgroups usually contain
short
2002 May 04
1
A simpler move-files patch
...ETE)
+ continue;
+ fname[0] = 0;
+ if (file->basedir) {
+ strlcpy(fname,file->basedir,MAXPATHLEN);
+ if (strlen(fname) == MAXPATHLEN-1) {
+ io_error = 1;
+ rprintf(FERROR, "send_files failed on long-named directory %s\n",
+ fname);
+ return;
+ }
+ strlcat(fname,"/",MAXPATHLEN);
+ }
+ strlcat(fname,f_name(file),MAXPATHLEN);
+ if (do_unlink(fname) == 0 && verbose > 1)
+ rprintf(FINFO,"sender removed %s\n",fname);
+ }
}
if (verbose > 2)
---8<------8<------8<------8<---cut here--->8------&...
2002 Nov 05
2
2.5.6 release
On Tue, Nov 05, 2002 at 08:37:00AM -0800, Martin Pool wrote:
> On 10 Oct 2002, "Green, Paul" <Paul.Green@stratus.com> wrote:
> > No new CVS messages have appeared on the rsync-cvs archives since August
> > 30th. This seems rather odd-- perhaps a daemon stopped working? If there
> > has truly been no activity since that date, I apologize for
> >
2012 Dec 27
3
[PATCH] hostfile: list known names (if any) for new hostkeys
...(i = 0; i < num_user_hostfiles; i++)
+ load_hostkeys(key_hostkeys, NULL, host_key,
+ user_hostfiles[i]);
+ for (i = 0; i < num_system_hostfiles; i++)
+ load_hostkeys(key_hostkeys, NULL, host_key,
+ system_hostfiles[i]);
+ if (key_hostkeys->num_entries > 0) {
+ strlcat(msg2, "You have previously accepted "
+ "this key for the following hostnames:",
+ sizeof(msg2));
+ for (i = 0; i < key_hostkeys->num_entries; i++) {
+ strlcat(msg2, "\n\t", sizeof(msg2));
+ strlcat(msg2, key_hostkeys->entries[i].host,...
2000 Apr 21
0
OpenSSH 1.2.3 on AIX 4.3.3
...sysmacros.h sys/time.h sys/ttcompat.h stddef.h util.h utmp.h utmpx.h)
# Checks for library functions.
-AC_CHECK_FUNCS(arc4random bindresvport_af freeaddrinfo gai_strerror getaddrinfo getnameinfo innetgr md5_crypt mkdtemp openpty rresvport_af setenv seteuid setlogin setproctitle setreuid snprintf strlcat strlcpy updwtmpx vsnprintf _getpty)
+AC_CHECK_FUNCS(arc4random bindresvport_af freeaddrinfo gai_strerror getaddrinfo getnameinfo innetgr md5_crypt mkdtemp openpty pututline rresvport_af setenv seteuid setlogin setproctitle setreuid snprintf strlcat strlcpy updwtmpx vsnprintf _getpty)
AC_CHECK_FU...
2001 May 22
1
[PATCH]: configure.in: Missing check for setvbuf
...fo getrlimit getrusage getttyent getusershell glob inet_aton inet_ntoa inet_ntop innetgr login_getcapbool md5_crypt memmove mkdtemp on_exit openpty realpath rresvport_af setdtablesize setenv setegid seteuid setlogin setproctitle setresgid setreuid setrlimit setsid sigaction sigvec snprintf strerror strlcat strlcpy strmode strsep strtok_r sysconf tcgetpgrp utimes vsnprintf vhangup vis waitpid _getpty __b64_ntop)
+AC_CHECK_FUNCS(arc4random atexit b64_ntop bcopy bindresvport_sa clock fchown fchmod freeaddrinfo futimes gai_strerror getcwd getaddrinfo getgrouplist getnameinfo getrlimit getrusage getttyent...
2006 Nov 02
0
ssh strlen fixes
...path_append(char *p1, char *p2)
{
char *ret;
- int len = strlen(p1) + strlen(p2) + 2;
+ size_t len = strlen(p1) + strlen(p2) + 2;
ret = xmalloc(len);
strlcpy(ret, p1, len);
- if (p1[strlen(p1) - 1] != '/')
+ if (p1[0] != '\0' && p1[strlen(p1) - 1] != '/')
strlcat(ret, "/", len);
strlcat(ret, p2, len);