* [PATCH] kconfig: Use PATH_MAX instead of 128 for path buffer sizes.
@ 2010-09-22 14:59 Will Newton
2010-09-24 9:32 ` Américo Wang
0 siblings, 1 reply; 7+ messages in thread
From: Will Newton @ 2010-09-22 14:59 UTC (permalink / raw)
To: Linux Kernel list; +Cc: Michal Marek, Sam Ravnborg
[-- Attachment #1: Type: text/plain, Size: 966 bytes --]
This prevents the buffers being overflowed when using a config
file with a long name. PATH_MAX is used elsewhere in the same
file, so use it here as well.
Signed-off-by: Will Newton <will.newton@imgtec.com>
---
scripts/kconfig/confdata.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c
index 515253f..9e2dda2 100644
--- a/scripts/kconfig/confdata.c
+++ b/scripts/kconfig/confdata.c
@@ -541,7 +541,7 @@ int conf_write(const char *name)
struct menu *menu;
const char *basename;
const char *str;
- char dirname[128], tmpname[128], newname[128];
+ char dirname[PATH_MAX+1], tmpname[PATH_MAX+1], newname[PATH_MAX+1];
enum symbol_type type;
time_t now;
int use_timestamp = 1;
@@ -662,7 +662,7 @@ next:
static int conf_split_config(void)
{
const char *name;
- char path[128];
+ char path[PATH_MAX+1];
char *s, *d, c;
struct symbol *sym;
struct stat sb;
--
1.7.2.2
[-- Attachment #2: 0001-kconfig-Use-PATH_MAX-instead-of-128-for-path-buffer-.patch --]
[-- Type: text/x-patch, Size: 1197 bytes --]
From 56ba849e18805158ca10ca1b28db0504f24d9563 Mon Sep 17 00:00:00 2001
From: Will Newton <will.newton@imgtec.com>
Date: Wed, 22 Sep 2010 15:49:22 +0100
Subject: [PATCH] kconfig: Use PATH_MAX instead of 128 for path buffer sizes.
This prevents the buffers being overflowed when using a config
file with a long name. PATH_MAX is used elsewhere in the same
file, so use it here as well.
Signed-off-by: Will Newton <will.newton@imgtec.com>
---
scripts/kconfig/confdata.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c
index 515253f..9e2dda2 100644
--- a/scripts/kconfig/confdata.c
+++ b/scripts/kconfig/confdata.c
@@ -541,7 +541,7 @@ int conf_write(const char *name)
struct menu *menu;
const char *basename;
const char *str;
- char dirname[128], tmpname[128], newname[128];
+ char dirname[PATH_MAX+1], tmpname[PATH_MAX+1], newname[PATH_MAX+1];
enum symbol_type type;
time_t now;
int use_timestamp = 1;
@@ -662,7 +662,7 @@ next:
static int conf_split_config(void)
{
const char *name;
- char path[128];
+ char path[PATH_MAX+1];
char *s, *d, c;
struct symbol *sym;
struct stat sb;
--
1.7.2.2
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] kconfig: Use PATH_MAX instead of 128 for path buffer sizes.
2010-09-22 14:59 [PATCH] kconfig: Use PATH_MAX instead of 128 for path buffer sizes Will Newton
@ 2010-09-24 9:32 ` Américo Wang
2010-10-04 13:00 ` Will Newton
0 siblings, 1 reply; 7+ messages in thread
From: Américo Wang @ 2010-09-24 9:32 UTC (permalink / raw)
To: Will Newton; +Cc: Linux Kernel list, Michal Marek, Sam Ravnborg
On Wed, Sep 22, 2010 at 03:59:13PM +0100, Will Newton wrote:
>This prevents the buffers being overflowed when using a config
>file with a long name. PATH_MAX is used elsewhere in the same
>file, so use it here as well.
>
>Signed-off-by: Will Newton <will.newton@imgtec.com>
Acked-by: WANG Cong <xiyou.wangcong@gmail.com>
Thanks!
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] kconfig: Use PATH_MAX instead of 128 for path buffer sizes.
2010-09-24 9:32 ` Américo Wang
@ 2010-10-04 13:00 ` Will Newton
2010-10-04 13:41 ` Michal Marek
0 siblings, 1 reply; 7+ messages in thread
From: Will Newton @ 2010-10-04 13:00 UTC (permalink / raw)
To: Américo Wang
Cc: Linux Kernel list, Michal Marek, Sam Ravnborg, linux-kbuild
On Fri, Sep 24, 2010 at 10:32 AM, Américo Wang <xiyou.wangcong@gmail.com> wrote:
> On Wed, Sep 22, 2010 at 03:59:13PM +0100, Will Newton wrote:
>>This prevents the buffers being overflowed when using a config
>>file with a long name. PATH_MAX is used elsewhere in the same
>>file, so use it here as well.
>>
>>Signed-off-by: Will Newton <will.newton@imgtec.com>
>
> Acked-by: WANG Cong <xiyou.wangcong@gmail.com>
>
> Thanks!
Ping!
Could someone take this please?
Thanks,
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] kconfig: Use PATH_MAX instead of 128 for path buffer sizes.
2010-10-04 13:00 ` Will Newton
@ 2010-10-04 13:41 ` Michal Marek
2010-10-04 13:46 ` Will Newton
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Michal Marek @ 2010-10-04 13:41 UTC (permalink / raw)
To: Will Newton
Cc: Américo Wang, Linux Kernel list, Sam Ravnborg, linux-kbuild
On 4.10.2010 15:00, Will Newton wrote:
> On Fri, Sep 24, 2010 at 10:32 AM, Américo Wang <xiyou.wangcong@gmail.com> wrote:
>> On Wed, Sep 22, 2010 at 03:59:13PM +0100, Will Newton wrote:
>>> This prevents the buffers being overflowed when using a config
>>> file with a long name. PATH_MAX is used elsewhere in the same
>>> file, so use it here as well.
>>>
>>> Signed-off-by: Will Newton <will.newton@imgtec.com>
>>
>> Acked-by: WANG Cong <xiyou.wangcong@gmail.com>
>>
>> Thanks!
>
> Ping!
>
> Could someone take this please?
Sorry, applied now. BTW, please do not send patches inline _and_ as
attachments at the same time, it confuses git am.
Michal
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] kconfig: Use PATH_MAX instead of 128 for path buffer sizes.
2010-10-04 13:41 ` Michal Marek
@ 2010-10-04 13:46 ` Will Newton
2010-10-04 13:46 ` Will Newton
2010-10-04 13:47 ` Will Newton
2 siblings, 0 replies; 7+ messages in thread
From: Will Newton @ 2010-10-04 13:46 UTC (permalink / raw)
To: Michal Marek
Cc: Américo Wang, Linux Kernel list, Sam Ravnborg, linux-kbuild
On Mon, Oct 4, 2010 at 2:41 PM, Michal Marek <mmarek@suse.cz> wrote:
> On 4.10.2010 15:00, Will Newton wrote:
>> On Fri, Sep 24, 2010 at 10:32 AM, Américo Wang <xiyou.wangcong@gmail.com> wrote:
>>> On Wed, Sep 22, 2010 at 03:59:13PM +0100, Will Newton wrote:
>>>> This prevents the buffers being overflowed when using a config
>>>> file with a long name. PATH_MAX is used elsewhere in the same
>>>> file, so use it here as well.
>>>>
>>>> Signed-off-by: Will Newton <will.newton@imgtec.com>
>>>
>>> Acked-by: WANG Cong <xiyou.wangcong@gmail.com>
>>>
>>> Thanks!
>>
>> Ping!
>>
>> Could someone take this please?
>
> Sorry, applied now. BTW, please do not send patches inline _and_ as
> attachments at the same time, it confuses git am.
Thanks!
The reason I send the patches in both ways is because last time I
checked the gmail web interface will mangle an inline patch, but not
an attached one, and most people like an inline patch for review
purposes. I'll have to check to see if there's another way to avoid
that problem.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] kconfig: Use PATH_MAX instead of 128 for path buffer sizes.
2010-10-04 13:41 ` Michal Marek
2010-10-04 13:46 ` Will Newton
@ 2010-10-04 13:46 ` Will Newton
2010-10-04 13:47 ` Will Newton
2 siblings, 0 replies; 7+ messages in thread
From: Will Newton @ 2010-10-04 13:46 UTC (permalink / raw)
To: Michal Marek
Cc: Américo Wang, Linux Kernel list, Sam Ravnborg, linux-kbuild
On Mon, Oct 4, 2010 at 2:41 PM, Michal Marek <mmarek@suse.cz> wrote:
> On 4.10.2010 15:00, Will Newton wrote:
>> On Fri, Sep 24, 2010 at 10:32 AM, Américo Wang <xiyou.wangcong@gmail.com> wrote:
>>> On Wed, Sep 22, 2010 at 03:59:13PM +0100, Will Newton wrote:
>>>> This prevents the buffers being overflowed when using a config
>>>> file with a long name. PATH_MAX is used elsewhere in the same
>>>> file, so use it here as well.
>>>>
>>>> Signed-off-by: Will Newton <will.newton@imgtec.com>
>>>
>>> Acked-by: WANG Cong <xiyou.wangcong@gmail.com>
>>>
>>> Thanks!
>>
>> Ping!
>>
>> Could someone take this please?
>
> Sorry, applied now. BTW, please do not send patches inline _and_ as
> attachments at the same time, it confuses git am.
Thanks!
The reason I send the patches in both ways is because last time I
checked the gmail web interface will mangle an inline patch, but not
an attached one, and most people like an inline patch for review
purposes. I'll have to check to see if there's another way to avoid
that problem.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] kconfig: Use PATH_MAX instead of 128 for path buffer sizes.
2010-10-04 13:41 ` Michal Marek
2010-10-04 13:46 ` Will Newton
2010-10-04 13:46 ` Will Newton
@ 2010-10-04 13:47 ` Will Newton
2 siblings, 0 replies; 7+ messages in thread
From: Will Newton @ 2010-10-04 13:47 UTC (permalink / raw)
To: Michal Marek
Cc: Américo Wang, Linux Kernel list, Sam Ravnborg, linux-kbuild
On Mon, Oct 4, 2010 at 2:41 PM, Michal Marek <mmarek@suse.cz> wrote:
> On 4.10.2010 15:00, Will Newton wrote:
>> On Fri, Sep 24, 2010 at 10:32 AM, Américo Wang <xiyou.wangcong@gmail.com> wrote:
>>> On Wed, Sep 22, 2010 at 03:59:13PM +0100, Will Newton wrote:
>>>> This prevents the buffers being overflowed when using a config
>>>> file with a long name. PATH_MAX is used elsewhere in the same
>>>> file, so use it here as well.
>>>>
>>>> Signed-off-by: Will Newton <will.newton@imgtec.com>
>>>
>>> Acked-by: WANG Cong <xiyou.wangcong@gmail.com>
>>>
>>> Thanks!
>>
>> Ping!
>>
>> Could someone take this please?
>
> Sorry, applied now. BTW, please do not send patches inline _and_ as
> attachments at the same time, it confuses git am.
Thanks!
The reason I send the patches in both ways is because last time I
checked the gmail web interface will mangle an inline patch, but not
an attached one, and most people like an inline patch for review
purposes. I'll have to check to see if there's another way to avo
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2010-10-04 13:47 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-22 14:59 [PATCH] kconfig: Use PATH_MAX instead of 128 for path buffer sizes Will Newton
2010-09-24 9:32 ` Américo Wang
2010-10-04 13:00 ` Will Newton
2010-10-04 13:41 ` Michal Marek
2010-10-04 13:46 ` Will Newton
2010-10-04 13:46 ` Will Newton
2010-10-04 13:47 ` Will Newton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.