tion non autorisée
If this change is desirable, I will propose patchs for programs in base
in order to call setlocale(LC_ALL, "") at program initilisation.
Comments, ideas ?
--
Sébastien Marie
Index: nls/catopen.c
===
RCS file: /c
On Fri, Jun 12, 2015 at 10:35:02AM +0200, Stefan Sperling wrote:
> On Fri, Jun 12, 2015 at 08:59:14AM +0200, Sébastien Marie wrote:
> > If this change is desirable, I will propose patchs for programs in base
> > in order to call setlocale(LC_ALL, "") at program in
name (locname), and used it in loadlocate() body for:
- check if the wanted value is already set
- effectively load the locale (load_locale_sub call)
- effectively assign the value in current_categories
--
Sébastien Marie
Index: locale/setlocale.c
called only at one place in loadlocale():
if (!load_locale_sub(category, new_categories[category])) {
The second argument (locname) of load_locale_sub() is always defined
with new_categories[category].
So we could replace new_categories[category] by locname in function body.
--
Sébastien
assed from global to local variable of
setlocale().
--
Sébastien Marie
Index: locale/setlocale.c
===
RCS file: /cvs/src/lib/libc/locale/setlocale.c,v
retrieving revision 1.21
diff -u -p -r1.21 setlocale.c
--- locale/setlocale.c
ostly the code of isalnum().
I hope my explanation is understandable enough.
Thanks.
--
Sébastien Marie
aft object-file to generate
out-of-bound read).
Maybe a check for overflow would be needed too ?
--
Sébastien Marie
Index: elf.c
===
RCS file: /cvs/src/usr.bin/nm/elf.c,v
retrieving revision 1.28
diff -u -p -r1.28 elf.c
--- el
On Wed, Jun 17, 2015 at 02:43:41PM +0200, Sébastien Marie wrote:
> Hi,
>
> I would like to report a SEGFAULT in nm(1) that occurs with object-file
> with no section headers (e_shnum = 0).
>
>
> Index: elf.c
>
Hi,
This patch corrects a read after bound that occurs in strcmp (line just
after the added bound check).
Found with afl.
--
Sébastien Marie
Index: elf.c
===
RCS file: /cvs/src/usr.bin/nm/elf.c,v
retrieving revision 1.28
diff -u
ed as Elf_Shdr[] (array of Elf_Shdr:
which is a fixed element size).
While here, inverts calloc() arguments to be calloc(nmemb, size),
according to fread() call after.
This problem was found with afl, when e_shentsize was 1.
--
Sébastien Marie
Index: b/usr.bin/nm/
Hi,
This patch ensure that when an error is detected, the freed variables in
elf_symloadx() are reinitialised.
Else show_file() in nm.c will used these variables, even if they has
just been freed. (nm.c +689).
Problem found by afl.
--
Sébastien Marie
Index: elf.c
this direction for now.
- change some if(x) free(x) idioms to free(x)
--
Sébastien Marie
Index: elf.c
===
RCS file: /cvs/src/usr.bin/nm/elf.c,v
retrieving revision 1.28
diff -u -p -r1.28 elf.c
--- elf.c 17 May 2015 20:
is a valid character in user-id or password:
user-pass = userid ":" password
userid = *
password= *TEXT
Here a patch to search the last '@' in the string (which don't contains
the path at thi
d not contains '@' char, and user/pass may contains
it, (as defined by rfc1738), this patch make ftp(1) to more respect
standard.
Thanks.
--
Sébastien Marie
On Mon, Jun 23, 2014 at 10:15:25AM +0200, Sébastien Marie wrote:
> Hi,
>
> Using ftp(1) with HTTP(S) scheme and B
On Tue, Jun 24, 2014 at 10:55:44AM -0700, Philip Guenther wrote:
> On Tue, Jun 24, 2014 at 9:01 AM, Sébastien Marie <
> semarie-open...@latrappe.fr> wrote:
>
> > As I see not activity or feedback for this one line patch, I think it
> > need more explain ?
> >
&
On Wed, Jun 25, 2014 at 07:07:30PM -0700, Philip Guenther wrote:
> On Wed, 25 Jun 2014, S?bastien Marie wrote:
> > On Tue, Jun 24, 2014 at 10:55:44AM -0700, Philip Guenther wrote:
> > > On Tue, Jun 24, 2014 at 9:01 AM, S?bastien Marie <
> > > semarie-open...@latrappe.fr> wrote:
> ...
> > So, I thin
rlier version of my diff,
> which had problems with some proxy setting, IIRC. Here's the diff that I
> settled on after testing.
>
It works also for my use-case. Please note I haven't tested proxy
setting (by lake of server to test).
Thanks for your help.
--
Sébastien Marie
is not NULL (req->q.manpath = req->p[0]).
The diff use the same style that when MAN_DIR is invalid (cgi.c:917), but that
could
be improved using err(3) ?
Thanks.
--
Sébastien Marie
Index: cgi.c
===
RCS file: /cvs/src/usr.b
points. It always set sc_ac_stat=-1, but if no error in acpitz_setfan
occurs, the call will set sc_ac_stat= _STA.
Another possibility (not tested) should be to change active cooling code
to permit call acpitz_setfan(OFF) when sc_ac_stat == -1.
Thanks to comment.
--
Sébastien Marie
Index: s
On Thu, Aug 21, 2014 at 10:44:36AM +0200, Sébastien Marie wrote:
> Hi,
>
> Another possibility (not tested) should be to change active cooling code
> to permit call acpitz_setfan(OFF) when sc_ac_stat == -1.
>
Next is the patch that implement the other possibility (the code is
run
e impact of not use this cache is negligible,
it is ok for me.
I join a very conservative patch which just allow calling
acpi_setfan(sc,i,"_OFF") if cache is unknown.
Thanks.
--
Sébastien Marie
Index: dev/acpi/acpitz.c
=
ping ?
Tihs patch is very conservative: it just allow to switch fan OFF if
state is unknown.
Thanks.
--
Sébastien Marie
On Wed, Aug 27, 2014 at 02:51:20PM +0200, Sébastien Marie wrote:
> Hi Jonathan,
>
> First, thanks for your feedback and for your patch.
>
> On Wed, Aug 27
st active_cooling.
- on notify 0x82 (ACPITZ_DEVLIST): it seems to me it is
valuable to set unknown state to sc_ac_stat when _ALx change, as
sc_ac_stat reflect the _STA value of _ALx
Thanks.
--
Sébastien Marie
Index: acpitz.c
=
thn-firmware-1.1p1
[...]
$ dmesg | grep athn
athn0 at uhub0 port 4 "ATHEROS USB2.0 WLAN" rev 2.00/1.08 addr 2
athn0: AR9271 rev 1 (1T1R), ROM rev 13, address c0:4a:00:1c:c0:aa
--
Sébastien Marie
it free the value on stack, and the array A too (as != NULL)
- it pops the array B
- it will try to set B[1] = 1, so it free B[1], which is A, which is
already freed: *boom*.
The patch just ensure a push_number (or push_string) properly initialize
the value, by set value.array to
; Actually, with this, the init in stack_grow can be left out, I believe.
As stack_grow is only used in stack_push{,number,string} and
initialization is done everywhere, I think it is ok.
Yours.
--
Sébastien Marie
y compiler
warning too (with -Wall -O2).
Thanks.
--
Sébastien Marie
Index: process.c
===
RCS file: /cvs/src/usr.bin/sed/process.c,v
retrieving revision 1.20
diff -u -p -r1.20 process.c
--- process.c 1 Dec 2014 06:37:25 -
(core dumped)
Found also with afl-fuzz.
Thanks.
--
Sébastien Marie
Index: compile.c
===
RCS file: /cvs/src/usr.bin/sed/compile.c,v
retrieving revision 1.36
diff -u -p -r1.36 compile.c
--- compile.c 8 Oct 2014 04:19:08 - 1
On Wed, Dec 10, 2014 at 11:16:21AM +0100, Sébastien Marie wrote:
> Hi,
>
> In compile_flags, the variable holding the filename ('w' flag of 's'
> command) is an array with PATH_MAX length.
>
> We should check the size of wanted filename, before copying it
On Wed, Dec 10, 2014 at 11:16:21AM +0100, Sébastien Marie wrote:
> Hi,
>
> In compile_flags, the variable holding the filename ('w' flag of 's'
> command) is an array with PATH_MAX length.
>
> We should check the size of wanted filename, before copying it
ould
never write to it (we stop): we keep two cells at end.
As simple test, defining wfile to "char wfile[2]", don't permit to save
to any filename, whereas one-char filename should be ok.
$ echo | sed -e s/a//w_
sed: 1: "s/a//w_": wfile too long
I think the test should be
On Wed, Dec 10, 2014 at 10:05:49PM +1100, Jonathan Gray wrote:
> On Wed, Dec 10, 2014 at 10:39:37AM +0100, Sébastien Marie wrote:
> >
> > Hi,
> >
> > Fuzzing sed with afl, I found a crash due to use of uninitialized
> > variable.
> >
> > In pro
On Thu, Dec 11, 2014 at 04:38:50PM +1100, Jonathan Gray wrote:
>
> Yes, I agree. I plan to commit this version:
>
It is ok for me.
Thanks.
Sébastien Marie
> Index: compile.c
> ===
> RCS file: /cvs/src/usr.b
On Sat, Mar 07, 2015 at 07:16:53AM +0100, Sébastien Marie wrote:
> Hi,
>
> I encounter a problem of parsing in ksh(1): a quote in a comment in a
> command substitution $(...) or `...` is parsed as quote and a closing quote
> is expected.
>
> Here code snippet that expose th
ine: the function magic_get_string, used for
get the "JFIF\" string, miss the end-of-line due to '\' char, resulting
processing outside the line variable.
Problem found using afl-fuzz.
The proposed diff ensure '\0' is correctly detected, and return an
error ("can
r 'text'.
While here, remove 'len' field from 'struct s_appends'. It was just used
for AP_STRING (used for 'a' command), and the switch from fwrite to
printf permit to not use it.
--
Sébastien Marie
Index: defs.h
=
On Sat, May 09, 2015 at 06:47:05AM +0200, Sébastien Marie wrote:
>
> Hi,
>
> Here a small patch to sed to make 'i' and 'a' command to always append
> "\n" after 'text'.
>
> While here, remove 'len' field from 'struct
Hi,
I would report (and correct) an invalid usage statement of file(1).
$ file
usage: file [-bchiLsW] [file ...]
$ man file | grep -A1 'SY'
SYNOPSIS
file [-bchiLsW] file ...
As at least one argument is mandatory, removing the [] would make sens.
Thanks.
--
Sébastien Mar
STDIN_FILENO for O_NONBLOCK.
Remaining interrogations:
- should '-' implies '-s' (as before) ?
- should I rename "-" to "/dev/stdin" in order to have similar output
than before ?
- why "file -s /dev/stdin" returns "data" instead
ffer than
expected, considering garbage as potential data.
before:
---
$ echo foobar | file -s /dev/stdin
/dev/stdin: data
after:
--
$ echo foobar | file -s /dev/stdin
/dev/stdin: ASCII text
Thanks.
--
Sébastien Marie
Index: file.c
==
gt; > $ echo foobar | file -s /dev/stdin
> > /dev/stdin: data
> >
> >
> >
> > after patching:
> > ---
> >
$ echo foobar | file -
/dev/stdin: ASCII text
$ file - < file.c
/dev/stdin: ASCII C program text
$ file ./- # pro
p; (errno == ENFILE || errno == EMFILE))
Because of open is used with O_NONBLOCK ?
But, if it isn't need it could be removed from my patch.
--
Sébastien Marie
pe)
I think fifo (S_IFIFO) should be attempted to be read too.
5.5$ mkfifo test
5.5$ (echo 123 > test) &
[1] 18981
5.5$ file -s test
test: ASCII text
Next a slightly modified patch.
--
Sébastien Marie
Index: file.1
===
Hi,
I start reading libc/locale code in order to understanding it.
Here a patch to remove an unused argument "isspecial" from static
function "load_locale_sub".
The function is called once, with isspecial=0, and the argument isn't
used in function's body.
Any
Hi
I have noted that "scaled_pentium_mhz" variable in i386/lapic.c is
defined and initialized, but never used anywhere (grep -R
scaled_pentium_mhz /usr/src say nothing [after patch applied]).
Remove it ?
--
Sébastien Marie
Index: arch/i386/i3
Hi,
Does it make sens to have an option to require package to be signed ?
Currently, a package without signature is gracefully installed without
warning.
The patch introduce an option "require-signature" in pkg.conf, and it
respects -Dnosig in comand-line, if present.
Thanks.
--
On Thu, Jan 16, 2014 at 10:02:22AM +, Stuart Henderson wrote:
> On 2014/01/16 08:53, Sébastien Marie wrote:
> > Hi,
> >
> > Does it make sens to have an option to require package to be signed ?
>
> It makes more sense to just enable that by default, w
47 matches
Mail list logo