search for: bzero

Displaying 20 results from an estimated 128 matches for "bzero".

Did you mean: zero
2012 Dec 20
4
Deprecated calls to bzero() and index() found in OpenSSH 6.1p1
Hello All, In reviewing source code for OpenSSH-6.1p1, I found instances of deprecated library calls still within various source code files. Examples of deprecated calls are: bzero() (replaced with memset() which is ANSI compliant), index() (replaced with strchr() which is also ANSI compliant). In file 'auth2-jpake.c', I've replaced all the bzero() calls with the equivalent memset() calls. The patch file is below in (diff -u) format: --- auth2-jpake.c.orig 201...
2012 Dec 21
0
File Attachments for previous bug report
...next part -------------- --- auth2-jpake.c.orig 2012-12-19 17:01:52.817528171 -0800 +++ auth2-jpake.c 2012-12-19 17:05:59.044554766 -0800 @@ -178,7 +178,7 @@ fatal("%s: not enough bytes for rawsalt (want %u have %u)", __func__, len, digest_len); memcpy(rawsalt, digest, len); - bzero(digest, digest_len); + memset(digest, 0, digest_len); xfree(digest); } @@ -203,10 +203,10 @@ fatal("%s: want %u", __func__, want); derive_rawsalt(user, rawsalt, sizeof(rawsalt)); - bzero(ret, sizeof(ret)); + memset(ret, 0, sizeof(ret)); for (i = 0; i < want; i...
2012 Jun 16
3
[LLVMdev] Building lld with Visual Studio 2012 RC
Hi! I'm trying to build lld Microsoft Visual Studio 2012 RC, but it seems the bzero function is not available. Could memset be used instead of bzero? Or maybe define a bzero for msvc using memset. For example: // in-memory matches on-disk, so copy first fields followed by path ::memcpy(to, (uint8_t*)&cmd, 12); ::memcpy(&to[12], _name.data(), _name.size...
2008 Sep 17
1
ACPI "blacklist" question
Hello, I have recently updated a machine to 7-stable. ACPI doesn't seem to work correctly on this machine. With earlier versions of FreeBSD (including the latest RELENG_6), I got this line in dmesg: ACPI disabled by blacklist. Contact your BIOS vendor. And everything was fine. The box runs perfectly well with ACPI disabled. (I can't get a BIOS update because the mainboard is too
2012 Jun 17
0
[LLVMdev] Building lld with Visual Studio 2012 RC
On Sat, Jun 16, 2012 at 4:15 PM, Cesar Mello <cmello at gmail.com> wrote: > Hi! > > I'm trying to build lld Microsoft Visual Studio 2012 RC, but it seems the > bzero function is not available. > > Could memset be used instead of bzero? Or maybe define a bzero for msvc > using memset. > > For example: > >       // in-memory matches on-disk, so copy first fields followed by path >       ::memcpy(to, (uint8_t*)&cmd, 12); >       ::me...
2013 May 09
3
[Bug 2100] New: Missing dereference when bzeroing unused identities
https://bugzilla.mindrot.org/show_bug.cgi?id=2100 Bug ID: 2100 Summary: Missing dereference when bzeroing unused identities Classification: Unclassified Product: Portable OpenSSH Version: 6.2p1 Hardware: Other OS: Linux Status: NEW Severity: enhancement Priority: P5 Component: ssh Assignee: unassig...
2012 Jun 17
3
[LLVMdev] Building lld with Visual Studio 2012 RC
...On Sat, Jun 16, 2012 at 10:22 PM, Michael Spencer <bigcheesegs at gmail.com>wrote: > On Sat, Jun 16, 2012 at 4:15 PM, Cesar Mello <cmello at gmail.com> wrote: > > Hi! > > > > I'm trying to build lld Microsoft Visual Studio 2012 RC, but it seems the > > bzero function is not available. > > > > Could memset be used instead of bzero? Or maybe define a bzero for msvc > > using memset. > > > > For example: > > > > // in-memory matches on-disk, so copy first fields followed by path > > ::memcpy(to,...
2009 Apr 01
2
bzero() before free()
Hi guys I've been browsing the code and at many places I found the following odd sequence: char * string=malloc(somesize); ? bzero(string,strlen(string)); free(string); I really don't see why you would zero a string and free the memory immediately afterwards? Any idea why this is done? Thanks! Met vriendelijke groet Best regards Bien ? vous Miguel SANDERS ArcelorMittal Gent UNIX Systems & Storage IT Supply Weste...
2006 Oct 31
0
6387674 bzeros removed by 6264344 were not gratuitous
Author: darrenm Repository: /hg/zfs-crypto/gate Revision: 448a96652f7fe8b4f2f8af8045dcef6f896be12a Log message: 6387674 bzeros removed by 6264344 were not gratuitous Files: update: usr/src/common/crypto/md5/md5.c update: usr/src/common/crypto/sha1/sha1.c update: usr/src/common/crypto/sha2/sha2.c
2008 Feb 24
0
Zeroing sensitive memory chunks [Was: Security Flaw in Popular Disk Encryption Technologies]
Good day. I am posting the follow-up to the -hackers and CC'ing to the -security, because some more-or-less nasty points were found. Sat, Feb 23, 2008 at 10:32:02PM +0300, Eygene Ryabinkin wrote: > But there is another concern with bzero(): it is well-known function. > Especially for compilers. And it is bad: some arrays inside g_eli, > that hold decryption keys are the local variables. And they are > not used after the final bzero() call, so optimizing compiler can > eliminate the bzero() completely, as the "not...
2007 Aug 24
2
[git patch] klibc bzero, mount fixes + random stuff
..., noexec and nosuid options mount: add -n option cpio: small cleanups readlink: s/link/link_name/ kinit, mknod: s/(major|minor)/\1_num/ klibc: strcspn, strpbrk, strspn include string.h resume, kill: axe unused envp usage devname.c: include kinit.h add bzero() and diffstat usr/include/string.h | 1 usr/kinit/devname.c | 2 + usr/kinit/do_mounts_md.c | 18 +++++------ usr/kinit/name_to_dev.c | 16 +++++----- usr/kinit/resume/resume.c | 2 - usr/klibc/Kbuild | 2 - usr/klibc/bzero.c | 9 +++++ usr/kli...
2005 Sep 30
4
C Manager Interface Client
...s my first manager client that I've written so please bear with me: I am trying to write a C manager interface client to interface with our CRM software. I am having an issue while reading the data from the manager interface. I am writing this in C and I have the following code: while(1) { bzero(buffer,sizeof(buffer)); readCode = read(socketHandle,buffer,sizeof(buffer)); if(readCode < 0) { printf("ERROR READING FROM SOCKET\n"); exit(0); } printf("%s",buffer); } This prints out everything just as connecting to the telnet session would print it out (I do the...
2001 Feb 01
0
warnings on aix325
...n aix3.2.5. Can I ignore this list of warning messages? bsd-bindresvport.c: In function `bindresvport_af': bsd-bindresvport.c:94: warning: implicit declaration of function `bind' bsd-rresvport.c: In function `rresvport_af': bsd-rresvport.c:64: warning: implicit declaration of function `bzero' bsd-rresvport.c:82: warning: implicit declaration of function `socket' bsd-rresvport.c:88: warning: implicit declaration of function `bind' bsd-setenv.c: In function `setenv': bsd-setenv.c:125: warning: implicit declaration of function `bcopy' bsd-setproctitle.c:62: warning: `_...
2015 Feb 26
4
Call for testing: OpenSSH 6.8
...f; struct cmsghdr *cmsg; - struct iovec iov; - char c = '\0'; - ssize_t r; +#endif + struct iovec vec; + char ch = '\0'; struct pollfd pfd; + ssize_t r; - /* Avoid obvious stupidity */ - if (isatty(STDOUT_FILENO)) - errx(1, "Cannot pass file descriptor to tty"); - - bzero(&mh, sizeof(mh)); - bzero(&cmsgbuf, sizeof(cmsgbuf)); - bzero(&iov, sizeof(iov)); - bzero(&pfd, sizeof(pfd)); - - mh.msg_control = (caddr_t)&cmsgbuf.buf; - mh.msg_controllen = sizeof(cmsgbuf.buf); - cmsg = CMSG_FIRSTHDR(&mh); + memset(&msg, 0, sizeof(msg)); +#ifdef HAVE_...
2015 Feb 25
2
Call for testing: OpenSSH 6.8
On 24/02/15 21:56, Tim Rice wrote: > On Wed, 25 Feb 2015, Damien Miller wrote: > > | On Tue, 24 Feb 2015, Tom G. Christensen wrote: > | > | > I've switched to HEAD in the git repo and it now builds on Solaris > | > 2.6, 7, 8 and 9 but the testsuite still cannot be built due to the > | > missing <err.h>. > > The err.h issue is fixes but there still
2008 Feb 28
1
C Code to connect to Asterisk Manager Interface
...netinet/in.h> #define MAX_MSG_SIZE 512 #define SERVER_ADDRESS "192.168.0.150" #define CLIENT_ADDRESS "192.168.0.150" #define SERVER_PORT 5038 #define CLIENT_PORT 5100 int main() { int sd; struct sockaddr_in serveraddr, clientaddr; char msg[MAX_MSG_SIZE]; bzero((char *) &serveraddr, sizeof(serveraddr)); serveraddr.sin_family = AF_INET; serveraddr.sin_addr.s_addr = inet_addr(SERVER_ADDRESS); serveraddr.sin_port = htons(SERVER_PORT); bzero((char *) &clientaddr, sizeof(clientaddr)); clientaddr.sin_family = AF_INET; clientaddr...
2003 May 20
1
smbd - wide links / possible buffer failure??
...able to follow that link. And I think (hopefully right) that it is also safe to check the physical way - unstead the link path. I've got I a alternative to solve this behavior, if the intention is not the right one - please ignore this request, if so fill free to use this patch. And also a bzero call resets the buffer to zero which can be undefined after the readlink call, in spacial circumstances the strncmp and also the DEBUG/TRACE might be result in a NULL Pointer or segmentation failure?? regards - Thomas Wild This patch looks first whether the destination of link is available and...
2003 Feb 20
0
Netbios name service forwarding.
...sockaddr_in bcast; struct sockaddr_in addr_cache[0x10000]; } *iface; iface ifs; void open_if (char *name, int nb_port, int dm_port) { struct sockaddr_in me = { 0 }; iface i = (iface) malloc (sizeof (struct iface_struct)); int fd; int one = 1; int j; struct ifreq ifr = { 0 }; bzero (i, sizeof (struct iface_struct)); i->name = strdup (name); i->fd = socket (AF_INET, SOCK_DGRAM, 0); if (i->fd < 0) { syslog (LOG_ERR, "Can't open socket: %m"); exit (1); } strcpy (&ifr.ifr_name[0], name); if (setsockopt (i->fd, SOL_S...
2016 Jan 19
2
OpenSSH portability & buildsystem fixes
...t;sys/param.h> is included in many files and isn't a standard header. The portability layer already handles all the things it might provide and I could just remove all its inclusions. The build system should just detect its absence and generate an empty header in openbsd-compat/. * bzero is used in deattack.c (and in regress/) instead of the standard memset. The code should be changed to use memset or the compatibility layer should provide its own bzero if absent. * misc.c uses gettimeofday but doesn't include <sys/time.h> to get it. * timerclear, timerisset and ti...
1997 Sep 26
3
Forwarded mail....
...ue_num; unsigned short int rep_num; unsigned short int num_rr; unsigned short int num_rrsup; unsigned char namelen; }; struct typez{ u_int type; u_int type2; }; unsigned int host2ip(char *serv) { struct sockaddr_in sin; struct hostent *hent; hent=gethostbyname(serv); if(hent == NULL) return 0; bzero((char *)&sin, sizeof(sin)); bcopy(hent->h_addr, (char *)&sin.sin_addr, hent->h_length); return sin.sin_addr.s_addr; } main( int argc, char **argv) { struct sockaddr_in sin_me , sin_dst; struct nmbhdr *nmb,*nmb2; struct iphdr *ipz; struct typez *typz; struct hostent *hent; int so...