(selected = malloc(nproc)) == NULL)
+ if ((selected = calloc(1, nproc)) == NULL)
errx(STATUS_ERROR, "memory allocation failure");
- memset(selected, 0, nproc);
/*
* Refine the selection.
--
Peter Malone
}
- if (n == 0) {
+ if (ret == 0) {
log_warnx("%s: no reply from PF_KEY", __func__);
return (-1);
}
--
Peter Malone
Thanks Ted.
I sent through another patch with timeout = -1. Passing INFTIM sounds
like the best option though.
Hopefully the rest checks out.
On 04/24/14 20:30, Ted Unangst wrote:
On Thu, Apr 24, 2014 at 19:27, Peter Malone wrote:
The more I think about this. if we want to continue the
t;p = d->data;
s->end = d->data + d->size;
s->kindset = kindset;
--
Peter Malone
eturn (l2tp_ctrl *)_this;
}
--
Peter Malone
listener));
L2TPD_ASSERT(sizeof(plistener->bind) >= addr->sa_len);
memcpy(&plistener->bind, addr, addr->sa_len);
--
Peter Malone
c__, "memory allocation failed");
free(sdl);
return(-1);
}
- memset(ifinfo, 0, sizeof(*ifinfo));
ifinfo->sdl = sdl;
strncpy(ifinfo->ifname, ifname, sizeof(ifinfo->ifname));
--
Peter Malone
(struct sockaddr *)&inetpeer, &len)) < 0) {
On Thu, 24 Apr 2014 19:27:29 -0400
Peter Malone wrote:
> The more I think about this. if we want to continue the select()
> NULL functionality then timeout should be a negative value for poll(),
> as NULL is unrecognized an
The more I think about this. if we want to continue the select()
NULL functionality then timeout should be a negative value for poll(),
as NULL is unrecognized and zero is a zero-length timeout.
On 04/24/14 18:08, Peter Malone wrote:
As promised. I cleaned up some of the code as well
f ((msgsock = accept(tcpsock,
(struct sockaddr *)&inetpeer, &len)) < 0) {
On Wed, 23 Apr 2014 21:56:56 -0400
Peter Malone wrote:
> Sounds good. I'll work on that tomorrow afternoon/evening.
>
>
> On 04/23/14 21:55, Ted Unangst wrot
Great explanation - thanks.
On 04/24/14 08:28, Todd C. Miller wrote:
Sudo runs on more systems thsan just OpenBSD and so has a lot of
configure goo and defines as a result. There's really no point in
removing that. Any changes made to the sudo in OpenBSD just makes
updates harder.
The allo
On 04/24/14 04:09, Stuart Henderson wrote:
On 2014/04/24 04:26, Miod Vallat wrote:
Same as the others, this time with src/usr.bin/mg/undo.c
You are now losing a memset() in the `rec doesn't come from malloc' code
path.
From the number and types of diff being sent, I am guessing these are
tool
np->n_flags = flags;
np->n_addr = (struct sockaddr *)(np + 1);
np->n_addrlen = dstaddr->sa_len;
--
Peter Malone
f, 0, sizeof(struct carpif));
memcpy(&cif->carpr, &carpr, sizeof(struct carpreq));
memcpy(&cif->kif, kif, sizeof(struct kif));
}
--
Peter Malone
NULL)
panic("Out of memory in undo code (record)");
}
- memset(rec, 0, sizeof(struct undo_rec));
return (rec);
}
--
Peter Malone
ct, most of alloc.c contains wrapper functions. Some are useful, like
estrdup(), but could be implemented better (it calls the malloc wrapper).
Any thoughts on this?
--
Peter Malone
Sounds good. I'll work on that tomorrow afternoon/evening.
On 04/23/14 21:55, Ted Unangst wrote:
On Wed, Apr 23, 2014 at 21:38, Peter Malone wrote:
Hi,
Similar to the others. malloc & memset replacement with calloc, this time
in sbin/nfsd/nfsd.c
fd_size = howmany(maxsock + 1
, 23 Apr 2014 21:35:59 -0400
Ted Unangst wrote:
> On Wed, Apr 23, 2014 at 21:24, Peter Malone wrote:
> > Hi,
> >
> > Similar to previous patches replacing malloc & memset with calloc, this
> > time in src/bin/systrace/intercept.c
> >
>
>
> >
if (tcpflag)
FD_SET(tcpsock, sockbits);
--
Peter Malone
me);
- memcpy(tlnew, tl, sizeof(struct intercept_translate));
tlnew->off = offset;
TAILQ_INSERT_TAIL(&tmp->tls, tlnew, next);
--
Peter Malone
intercept.c
Description: Binary data
memset(zeroes, 0, MAXBSIZE);
+ err(1, "calloc");
}
if ((from_fd = open(entp->fts_path, O_RDONLY, 0)) == -1) {
--
Peter Malone
utils.patch
Description: Binary data
Hi,
malloc & memset can be replaced with calloc in ping.c. Please see below
for patch details:
Index: ping.c
===
RCS file: /cvs/src/sbin/ping/ping.c,v
retrieving revision 1.100
diff -u -p -u -r1.100 ping.c
--- ping.c24 Mar 201
Hi,
Theo has been working on these patches over the past few days. I noticed
an issue with dso_lib.c and fixed it accordingly.
# cvs diff -u -r1.10 dso_lib.c
Index: dso_lib.c
===
RCS file: /cvs/src/lib/libssl/src/crypto/dso/dso_li
That's it in a nutshell, essentially.
I'll take a stab at it, until I get frustrated.
Perhaps my time would be better suited to something else which could
help OpenBSD. For the time being, however, I'll give this a shot.
On 04/20/14 02:18, Maxime Villard wrote:
Le 20/04/20
Hi,
I'm using OpenBSD 5.5. courier-imap-4.13 is in the ports tree and it's
quite a mess. I started looking at it today with the hope of just
replacing some of the malloc,strcat & strcpy calls with asprintf, but it
became clear before long that there's lots more issues with this code.
Regardless,
25 matches
Mail list logo