Displaying 20 results from an estimated 175 matches for "memmem".
2005 Feb 16
1
memmem broken?
...ad bug in udev if compiled with klibc. I seems that the needle
string can't have a strlen of 1. This test case illustrates it:
#include <stdio.h>
#include <string.h>
int main(int argc, char *argv[], char *envp[])
{
char *hay = "a/b";
char *needle = "/";
if (memmem(hay, strlen(hay), needle, strlen(needle)) == NULL)
printf("This uses the 'Not So Naive' algorithm... Which is broken. :)\n");
else
printf("ok\n");
}
Thanks,
Kay
2020 Apr 22
5
[Bug 3152] New: #ifdef around memmem() is invalid.
https://bugzilla.mindrot.org/show_bug.cgi?id=3152
Bug ID: 3152
Summary: #ifdef around memmem() is invalid.
Product: Portable OpenSSH
Version: 8.2p1
Hardware: Other
OS: Windows 10
Status: NEW
Severity: enhancement
Priority: P5
Component: Miscellaneous
Assignee: unassigned-bugs at mindrot.org...
2007 Jan 05
1
[PATCH] Re: [Xen-staging] [xen-unstable] [XEN] Avoid use of GNU-specific memmem().
...1-04 at 10:18 +0000, Xen staging patchbot-unstable wrote:
> # HG changeset patch
> # User kfraser@localhost.localdomain
> # Date 1167905854 0
> # Node ID bdbfbfdfbd64ddedc775d55f1a9e842847fea7b2
> # Parent 60f91c9f1a248491e2f216d009a27a4c7e5e67d4
> [XEN] Avoid use of GNU-specific memmem().
> --- a/xen/tools/symbols.c Wed Jan 03 23:53:27 2007 +0000
> +++ b/xen/tools/symbols.c Thu Jan 04 10:17:34 2007 +0000
> @@ -350,6 +350,14 @@ static void build_initial_tok_table(void
> table_cnt = pos;
> }
>
> +static void *memmem_pvt(void *h, size_t hlen, void *n, size...
2016 Mar 23
2
Re: [PATCH v3 05/11] conn: Pretend to be a serial terminal, so sgabios doesn't hang.
..." for its size using the
> + * ISO/IEC 6429 Device Status Report (ESC [ 6 n). If it doesn't
> + * read anything back, then it unfortunately hangs for 0.26 seconds.
> + * Therefore we detect this situation and send back a fake console
> + * size.
> + */
> + if (memmem (buf, n, dsr_request, sizeof dsr_request - 1) != NULL) {
> + /* Ignore any error from this write, as it's just an optimization.
> + * We can't even be sure that console_sock is a socket or that
> + * it's writable.
> + */
> + ignore_value (write (conn-&g...
2011 Aug 29
0
[PATCH] Add mempcpy() as wrapper around memcpy
...*, int, size_t);
__extern int memcmp(const void *, const void *, size_t);
__extern void *memcpy(void *, const void *, size_t);
+__extern void *mempcpy(void *, const void *, size_t);
__extern void *memmove(void *, const void *, size_t);
__extern void *memset(void *, int, size_t);
__extern void *memmem(const void *, size_t, const void *, size_t);
diff --git a/usr/klibc/Kbuild b/usr/klibc/Kbuild
index c4f9ae2..d024f31 100644
--- a/usr/klibc/Kbuild
+++ b/usr/klibc/Kbuild
@@ -29,7 +29,7 @@ klib-y := vsnprintf.o snprintf.o vsprintf.o sprintf.o \
pselect.o ppoll.o \
brk.o sbrk.o malloc.o reall...
2003 Nov 24
1
[PATCH] library functions
....
# --------------------------------------------
#
diff -Nru a/klibc/Makefile b/klibc/Makefile
--- a/klibc/Makefile Mon Nov 24 11:33:52 2003
+++ b/klibc/Makefile Mon Nov 24 11:33:52 2003
@@ -27,6 +27,7 @@
brk.o sbrk.o malloc.o realloc.o calloc.o mmap.o \
memcpy.o memcmp.o memset.o memccpy.o memmem.o memswap.o \
memmove.o \
+ strcasecmp.o strncasecmp.o strndup.o strerror.o \
strcat.o strchr.o strcmp.o strcpy.o strdup.o strlen.o \
strncat.o strstr.o strncmp.o strncpy.o strrchr.o strspn.o \
strsep.o strtok.o \
diff -Nru a/klibc/include/string.h b/klibc/include/string.h
--- a/k...
2019 Sep 01
11
[nbdkit PATCH 00/10] Avoid -Wshadow
While working on can_FOO caching, at one point I got confused by
whether 'readonly' meant the global set by -r or a local passed to
.open(). A quick attempt to compile with -Wshadow found several other
confusing points; this series gets us to the point that we can add
-Wshadow to builds with --enable-gcc-warnings.
Eric Blake (10):
server: Avoid -Wshadow warnings
guestfs: Avoid
2016 Mar 23
0
Re: [PATCH v3 05/11] conn: Pretend to be a serial terminal, so sgabios doesn't hang.
On Wed, Mar 23, 2016 at 10:39:43AM +0100, Pino Toscano wrote:
> If I read this correctly, the newly added memmem would be executed for
> every read data from the daemon socket:
> read_data -> handle_log_message -> memmem
I think only from the console socket (not the daemon socket, and hence
not download APIs). However I will see if it's possible to limit this
to the accept phase anyway, si...
2014 Jun 10
2
No rule to make target `efi32/com32/lib/memcmp.o', needed by `syslinux.so'.
...lib/memcmp.o', needed by `syslinux.so'. Stop.
make[3]: Leaving directory `efi32/efi'
make[2]: *** [efi] Error 2
Output of `ls -Gl efi32/com32/lib/mem*.o`:
-rw-r--r-- 1 stappers 2812 Jun 10 22:06 efi32/com32/lib/memcpy.o
-rw-r--r-- 1 stappers 3620 Jun 10 22:06 efi32/com32/lib/memmem.o
-rw-r--r-- 1 stappers 2744 Jun 10 22:06 efi32/com32/lib/memmove.o
-rw-r--r-- 1 stappers 2548 Jun 10 22:06 efi32/com32/lib/mempcpy.o
-rw-r--r-- 1 stappers 2736 Jun 10 22:06 efi32/com32/lib/memset.o
What should have build efi32/com32/lib/memcmp.o ?
Groeten
Geert Stappers
--
Leven en lat...
2019 Sep 23
0
[PATCH v2 5/5] build: remove unused gnulib modules
..._inet
base64
byteswap
c-ctype
cloexec
closeout
connect
-dup3
error
-filevercmp
fstatat
-fts
full-read
full-write
futimens
-getaddrinfo
getline
getprogname
gitlog-to-changelog
glob
-gnu-make
gnumakefile
hash
hash-pjw
human
-iconv
ignore-value
intprops
lock
@@ -141,24 +133,18 @@ memmem
mkdtemp
mkstemps
netdb
-netinet_in
nonblocking
-openat
perror
pipe2
pread
-ptsname_r
-read-file
readlink
select
setenv
sleep
socket
-stat-time
strchrnul
strerror
strndup
-symlinkat
sys_select
sys_types
sys_wait
@@ -166,9 +152,6 @@ tls
vasprintf
vc-list-files
warnings
-xalloc
-x...
2010 Jul 30
33
[PATCHES] Smartjog PatchDump
Hello,
I work at SmarctJog.com, we have here some patches on IceCast for
performance and reliability, these are mostly client/connection/source
cleanups (a slave merge is underway, and some more good stuff (c)),
but we'd like this to be merged in before the list gets any longer.
Please find attached a list of our patches with a short desc:
This one is actually not from us/me, it was found
2013 Mar 07
3
[PATCH 0/3] protocol: Abstract out socket operations.
I've been taking a long hard look at the protocol layer. It has
evolved over a long time without any particular direction, and the
result is, to say the least, not very organized.
These patches take a first step at cleaning up the mess by abstracting
out socket operations from the rest of the code. The purpose of this
is to allow us to slot in a different connection layer under the
2016 Mar 17
0
[PATCH 1/3] appliance: Pass "quiet" option to kernel when !verbose.
...nst char *sentinel;
size_t slen;
+ /* Since 2016-03, if !verbose, then we add the "quiet" flag to the
+ * kernel, so the following sentinel will never be produced. XXX
+ */
sentinel = "Linux version"; /* kernel up */
slen = strlen (sentinel);
if (memmem (buf, len, sentinel, slen) != NULL)
--
2.5.0
2016 Mar 20
0
[PATCH] conn: Pretend to be a serial terminal, so sgabios doesn't hang.
...query the "serial console" for its size using the
+ * ISO/IEC 6429 Device Status Report (ESC [ 6 n). If it doesn't
+ * read anything back, then it unfortunately hangs for 0.25 seconds.
+ * Therefore we detect this situation and send back a fake console
+ * size.
+ */
+ if (memmem (buf, n, dsr_request, sizeof dsr_request - 1) != NULL) {
+ /* Ignore any error from this write, as it's just an optimization.
+ * We can't even be sure that console_sock is a socket or that
+ * it's writable.
+ */
+ ignore_value (write (conn->console_sock, dsr_reply...
2016 Mar 22
0
[PATCH v3 05/11] conn: Pretend to be a serial terminal, so sgabios doesn't hang.
...query the "serial console" for its size using the
+ * ISO/IEC 6429 Device Status Report (ESC [ 6 n). If it doesn't
+ * read anything back, then it unfortunately hangs for 0.26 seconds.
+ * Therefore we detect this situation and send back a fake console
+ * size.
+ */
+ if (memmem (buf, n, dsr_request, sizeof dsr_request - 1) != NULL) {
+ /* Ignore any error from this write, as it's just an optimization.
+ * We can't even be sure that console_sock is a socket or that
+ * it's writable.
+ */
+ ignore_value (write (conn->console_sock, dsr_reply...
2005 Jan 06
0
[PATCH] memchr and memrchr
...0.194/klibc/Makefile.orig 2005-01-06 23:09:57.423628424 -0700
+++ klibc-0.194/klibc/Makefile 2005-01-06 23:09:48.031056312 -0700
@@ -30,7 +30,7 @@
sigaction.o sigpending.o sigprocmask.o sigsuspend.o \
brk.o sbrk.o malloc.o realloc.o calloc.o mmap.o \
memcpy.o memcmp.o memset.o memccpy.o memmem.o memswap.o \
- memmove.o memchr.o \
+ memmove.o memchr.o memrchr.o \
strcasecmp.o strncasecmp.o strndup.o strerror.o \
strcat.o strchr.o strcmp.o strcpy.o strdup.o strlen.o strnlen.o \
strncat.o strlcpy.o strlcat.o \
--
Thayne Harbaugh
Linux Networx
2014 Jun 12
0
No rule to make target `efi32/com32/lib/memcmp.o', needed by `syslinux.so'.
...ror 2
It was encountered while doing `make`.
The `make efi32` is just to faster reproduce the build error.
> Output of `ls -Gl efi32/com32/lib/mem*.o`:
>
> -rw-r--r-- 1 stappers 2812 Jun 10 22:06 efi32/com32/lib/memcpy.o
> -rw-r--r-- 1 stappers 3620 Jun 10 22:06 efi32/com32/lib/memmem.o
> -rw-r--r-- 1 stappers 2744 Jun 10 22:06 efi32/com32/lib/memmove.o
> -rw-r--r-- 1 stappers 2548 Jun 10 22:06 efi32/com32/lib/mempcpy.o
> -rw-r--r-- 1 stappers 2736 Jun 10 22:06 efi32/com32/lib/memset.o
>
> What should have build efi32/com32/lib/memcmp.o ?
I asked that bec...
2008 Aug 16
1
Minimal COM32 Root Module
...ys/ansi.o \
\
sys/ansicon_write.o sys/ansiserial_write.o \
\
syslinux/serial.o
LIBOTHER_OBJS = \
abort.o atexit.o atoi.o atol.o atoll.o calloc.o creat.o \
ctypes.o \
putchar.o setjmp.o \
fread2.o fwrite2.o getopt.o \
lrand48.o memccpy.o memchr.o memcmp.o \
memcpy.o mempcpy.o memmem.o memmove.o memset.o memswap.o \
exit.o onexit.o \
perror.o qsort.o realloc.o seed48.o snprintf.o \
sprintf.o srand48.o sscanf.o strcasecmp.o \
strdup.o strerror.o strlen.o \
strnlen.o \
strncasecmp.o strncat.o strncmp.o strndup.o \
stpcpy.o stpncpy.o \
strntoimax.o strntoum...
2019 Sep 18
2
[PATCH] build: remove unused gnulib modules
...ypes-pri.m4
/ioctl.m4
-/i-ring.m4
-/isatty.m4
/isblank.m4
-/isc-posix.m4
/langinfo_h.m4
/largefile.m4
-/lchown.m4
/lcmessage.m4
/lib-ld.m4
/lib-link.m4
@@ -125,7 +101,6 @@
/locale-zh.m4
/localtime-buffer.m4
/lock.m4
-/longdouble.m4
/longlong.m4
/lseek.m4
/lstat.m4
@@ -143,7 +118,6 @@
/memmem.m4
/mempcpy.m4
/memrchr.m4
-/mgetgroups.m4
/minmax.m4
/mkdir.m4
/mkdtemp.m4
@@ -175,7 +149,6 @@
/pthread_rwlock_rdlock.m4
/pthread_sigmask.m4
/pthread-thread.m4
-/ptsname_r.m4
/putenv.m4
/quotearg.m4
/quote.m4
@@ -194,7 +167,6 @@
/save-cwd.m4
/sched_h.m4
/select.m4
-/servent.m4
/sete...
2019 Sep 23
6
[PATCH v2 0/5] remove unused gnulib modules
This is an extended version of:
https://www.redhat.com/archives/libguestfs/2019-September/msg00178.html
It adds a couple of simple code changes, so it makes it possible to
drop more modules. In addition, more unused modules were dropped.
Pino Toscano (5):
tests: switch away from xgetcwd
daemon: move read_whole_file to common utils
daemon: switch from read_file to read_whole_file
daemon: