(bp->free > 1)
- bp->rotor += r;
- i = bp->rotor++ & (bp->total - 1);
+ i = (r / MALLOC_CHUNK_LISTS) & (bp->total - 1);
/* start somewhere in a short */
lp = >bits[i / MALLOC_BITS];
Regards,
kshe
if (strlcat(format, "%", sizeof(format)) >=
- sizeof(format))
- errx(1, "-w word too long");
+ if ((format = realloc(format,
+ len + sizeof("%"))) == NULL)
+ err(1, NULL);
+ strcpy(format + len, "%");
break;
}
}
Regards,
kshe
BITS] |= (u_short)1U << (i % MALLOC_BITS);
at the end of the new init_chunk_info() function?
Besides, a few lines above those loops, I think p->shift could directly
be set to MALLOC_MINSHIFT when bits == 0, without having to recalculate
it from MALLOC_MINSIZE.
Regards,
kshe
, junking is done without size restrictions.
.It Cm R
Regards,
kshe
NK, psz - sz);
else
memset(p, SOME_JUNK, psz - mopts.malloc_guard);
- }
- else if (mopts.chunk_canaries)
+ } else if (mopts.chunk_canaries)
fill_canary(p, sz - mopts.malloc_guard,
psz - mopts.malloc_guard);
Regards,
kshe
within double quotes has a special meaning
Regards,
kshe
';
errx(1, "illegal or unsupported format '%s'", p2);
}
while (*++p != '\0')
Regards,
kshe
and will cause the `-i' flag to have no effect at all.
If you really want to do this without a ternary operator, the equivalent
form is
if (iflag && strcasecmp(t1, t2) || !iflag && strcmp(t1, t2))
which looks very dumb indeed, but at least it is logically sound.
Regards,
kshe
'.
Until some form of agreement can be reached on that issue, I have
reverted the removal of `!' in my personal tree, so I still pay the
exact same price as everybody else ("proc exec"), but at least I now get
something useful out of that.
Regards,
kshe
"in exponent");
+ BN_free(p->number);
+ p->number = i;
BN_free(f);
-
- normalize(p, 0);
}
neg = BN_is_negative(p->number);
Regards,
kshe
egardless of those performance
considerations.
Regards,
kshe
On Sat, 16 Dec 2017 21:52:44 +, Theo de Raadt wrote:
> > On Sat, 16 Dec 2017 19:39:27 +, Theo de Raadt wrote:
> > > > On Sat, 16 Dec 2017 18:13:16 +, Jiri B wrote:
> > > > > On Sat, Dec 16, 2017 at 04:55:44PM +, kshe wrote:
> > > >
On Sat, 16 Dec 2017 19:39:27 +, Theo de Raadt wrote:
> > On Sat, 16 Dec 2017 18:13:16 +, Jiri B wrote:
> > > On Sat, Dec 16, 2017 at 04:55:44PM +, kshe wrote:
> > > > Hi,
> > > >
> > > > Would a patch to bring back the `!' command
On Sat, 16 Dec 2017 18:13:16 +, Jiri B wrote:
> On Sat, Dec 16, 2017 at 04:55:44PM +0000, kshe wrote:
> > Hi,
> >
> > Would a patch to bring back the `!' command to less(1) be accepted? The
> > commit message for its removal explains that ^Z should be used instead,
errx(1, "BN failure: %s",
+ ERR_reason_error_string(ERR_get_error()));
+ }
}
Regards,
kshe
/
$ printf '99d\nwq\n' | ed - less.hlp
Regards,
kshe
&& w)/* clear the message header */
@@ -1809,7 +1808,7 @@ sysctl_rtable(int *name, u_int namelen,
NET_UNLOCK();
break;
}
- free(w.w_tmem, M_RTABLE, 0);
+ free(w.w_tmem, M_RTABLE, w.w_tmemsize);
w.w_needed += w.w_given;
if (where) {
*given = w.w_where - (caddr_t)where;
Regards,
kshe
,6 @@ EXCMDLIST const cmds[] = {
{"~", ex_subtilde,E_ADDR2,
"s",
"[line [,line]] ~ [cgr] [count] [#lp]",
- "replace previous RE with previous replacement string,"},
+ "replace previous RE with previous replacement string"},
{NULL},
};
Regards,
kshe
icient approach.
I am happy to wait until you find enough time for a proper evaluation of
the issue at stake; this is not a race.
Regards,
kshe
On Tue, 12 Dec 2017 12:44:03 +, Todd C. Miller wrote:
> On Tue, 12 Dec 2017 11:57:58 +0000, kshe wrote:
>
> > Perhaps the worst part of all this, though, is how the change of
> > behaviour, which made sed fail hard where it previously handled input in
> > a perfectly de
e to provide a proper and definitive fix to deal with this issue
(and, at the same time, many other unrelated bugs).
Regards,
kshe
On Sun, 10 Dec 2017 11:25:50 +, Martin Pieuchot wrote:
> On 08/12/17(Fri) 12:58, kshe wrote:
> > I noticed one instance where the size given to free(9) can easily be
> > determined.
>
> What about the other free(9)s in the same function?
Somehow I did not immediately re
struct ifaddr *ifa)
{
struct ifnet*ifp = ifa->ifa_ifp;
- struct mbuf *m = NULL;
+ struct mbuf *m;
struct rt_addrinfo info;
struct ifa_msghdr *ifam;
Regards,
kshe
t;);
if (oflg)
printf("%s", ":OFFSET ");
if (checkfile && fsflg == 0)
Regards,
kshe
}
Regards,
kshe
rscale = bmachine.scale;
} else {
@@ -1507,7 +1493,6 @@ compare(enum bcode_compare type)
}
}
}
-
static void
nop(void)
Regards,
kshe
(r, a, b, bmachine.scale);
-
- push_number(r);
+ bmul_number(b, a, b, bmachine.scale);
free_number(a);
- free_number(b);
+ push_number(b);
}
static void
Regards,
kshe
On Sun, 03 Dec 2017 12:25:15 +, Philippe Meunier wrote:
> kshe wrote:
> >Also, the manual defines the length of a number as its number of digits,
> >so perhaps it should be precised that zero is considered to have no
> >digits, which might not be obvious to everyone.
41,7 +1310,6 @@ bsqrt(void)
r->scale = scale;
r->number = y;
BN_free(x);
- BN_CTX_free(ctx);
push_number(r);
}
Regards,
kshe
Also, the manual defines the length of a number as its number of digits,
so perhaps it should be precised that zero is considered to have no
digits, which might not be obvious to everyone.
Other than that, I think this makes more sense indeed.
Regards,
kshe
On Fri, 01 Dec 2017 08:58:55 +, Otto Moerbeek wrote:
> On Thu, Nov 30, 2017 at 01:10:33PM +0000, kshe wrote:
> > On Thu, 30 Nov 2017 07:22:42 +, Otto Moerbeek wrote:
> > > On Sun, Nov 26, 2017 at 07:40:03PM +, kshe wrote:
> > > > Hi,
> > > &
uot;
.Ft int
-.Fn vswprintf "wchar_t * restrict ws" "size_t n" "const wchar_t *restrict
format" "va_list ap"
+.Fn vswprintf "wchar_t * restrict ws" "size_t n" "const wchar_t * restrict
format" "va_list ap"
.Ft int
.Fn vwprintf "const wchar_t * restrict format" "va_list ap"
.Sh DESCRIPTION
Regards,
kshe
On Tue, 28 Nov 2017 09:52:26 +, Otto Moerbeek wrote:
> On Sun, Nov 26, 2017 at 07:51:13PM +0000, kshe wrote:
> > Hi,
> >
> > The following behaviour seems unacceptable to me.
> >
> > $ dc -e '16dio .C .C0 f'
> > .C0
> > .B
> >
(size_t)-1) {
- free(mbstr);
+ freezero(mbstr, len);
return (EOF);
}
if (mlen == len)
@@ -82,7 +82,7 @@ vswscanf(const wchar_t * __restrict str,
f._read = eofread;
f._lb._base = NULL;
r = __vfwscanf(, fmt, ap);
- free(mbstr);
+ freezero(mbstr, len);
return (r);
}
Regards,
kshe
On Thu, 30 Nov 2017 07:22:42 +, Otto Moerbeek wrote:
> On Sun, Nov 26, 2017 at 07:40:03PM +0000, kshe wrote:
> > Hi,
> >
> > The `Z' command can be a handy shortcut for computing logarithms; as
> > such, for example, it is the basis of the implementation of bc(1)'s
On Mon, 27 Nov 2017 10:41:05 +, Jason McIntyre wrote:
> On Sun, Nov 26, 2017 at 07:47:01PM +0000, kshe wrote:
> > Hi,
> >
> > I noticed a certain number of inaccuracies within the manual page for
> > sed. The diff below corrects to most obvious ones, althou
On Tue, 28 Nov 2017 08:08:24 +, Otto Moerbeek wrote:
> On Sun, Nov 26, 2017 at 07:25:46PM +0000, kshe wrote:
> > Hi,
> >
> > The diff below encompasses three unrelated minor changes.
> >
> > 1. Merge the not_equal(), not_less() and not_greater(
of my first patch,
many of which simply mirror the already established use of recallocarray
on the same buffers.
Regards,
kshe
On Mon, 27 Nov 2017 08:01:25 +, Otto Moerbeek wrote:
> On Mon, Nov 27, 2017 at 05:48:14AM +0000, kshe wrote:
> > On Mon, 27 Nov 2017 00:42:01 +, Theo de Raadt wrote:
> > > This needs worst-case performance measurements.
> >
> > The only instances where
too slow, because doing
things, as stdio does, like reading from and writing to disk or decoding
and converting user input will always dominate the effect of a few calls
to discard temporary buffers.
Regards,
kshe
On Sun, 26 Nov 2017 19:56:03 +, kshe wrote:
> Hi,
>
> Shortly after recallocarray(3) was introduced, it was put into use for
> several objects internal to the stdio library "to avoid leaving detritus
> in memory when resizing buffers". However, in the end, this m
ch);
+ unknown();
#ifdef DEBUGGING
stack_print(stderr, , "* ",
Regards,
kshe
_bit_set(n->number, numbits-i-1) << (7 - i);
(void)putc(ch, f);
numbits -= 8;
}
- BN_free(v);
}
Regards,
kshe
;stdio", NULL) == -1)
- err(1, "pledge");
src_setstream(, stdin);
reset_bmachine();
Regards,
kshe
vswscanf(const wchar_t * __restrict str,
f._read = eofread;
f._lb._base = NULL;
r = __vfwscanf(, fmt, ap);
- free(mbstr);
+ freezero(mbstr);
return (r);
}
Regards,
kshe
10 could be added to the manual.
Regards,
kshe
-.Ic w , \&: ,
+.Ic a , c , i , r , w
and
.Ic # .
Regards,
kshe
default:
break;
}
Regards,
kshe
-static void
greater(void)
{
compare(BCODE_GREATER);
}
-static void
-not_greater(void)
-{
- compare(BCODE_NOT_GREATER);
-}
-
static bool
compare_numbers(enum bcode_compare type, struct number *a, struct number *b)
{
Regards,
kshe
rt, a) >= 0)
+ d++;
+
+ BN_CTX_free(ctx);
+ BN_free(a);
+ BN_free(p);
+ } else
+ d++;
+
+ BN_free(int_part);
+
+ return d + n->scale;
}
static void
Regards,
kshe
ut the hassle of having
to untangle such old and messy code. As a consequence, especially since
no one at OpenBSD appears to have time to deal with all the deficiencies
of the existing source, it might be simpler to wait until I am done with
my own, as my code shall be much more readable than the current one, and
therefore quite easy to review.
Kind regards,
kshe
se `size_t' instead of `int' for a variable holding a length.
7. Slightly improve the logic of regsub() to avoid a bunch of no-op
instructions when `len' is zero.
8. Move a goto label previously redirecting into a conditional that was
always false within that context.
9. Add missing tabs to align backslashes in macro definitions.
Kind regards,
kshe
laborate on that idea after committing such an unsatisfying
patch, I would of course be very happy to help.
Kind regards,
kshe
53 matches
Mail list logo