public inbox for eudev@lists.gentoo.org
 help / color / mirror / Atom feed
* [eudev] [PATCH] udev-event.c: do not assign s to address to pointer
@ 2017-12-02 17:21 Marcus Folkesson
  2017-12-04 12:47 ` Anthony G. Basile
  0 siblings, 1 reply; 3+ messages in thread
From: Marcus Folkesson @ 2017-12-02 17:21 UTC (permalink / raw
  To: eudev; +Cc: marcus.folkesson

Solve a bug that could result in really nasty behavior.

Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
---
 src/udev/udev-event.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/udev/udev-event.c b/src/udev/udev-event.c
index 19079bf02..4120c04f2 100644
--- a/src/udev/udev-event.c
+++ b/src/udev/udev-event.c
@@ -201,7 +201,7 @@ subst:
                         _s = s;
                         _l = l;
                         /* temporarily use sbuf */
-                        s = &sbuf;
+                        s = sbuf;
                         l = UTIL_PATH_SIZE;
                 }
 
-- 
2.15.0



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [eudev] [PATCH] udev-event.c: do not assign s to address to pointer
  2017-12-02 17:21 [eudev] [PATCH] udev-event.c: do not assign s to address to pointer Marcus Folkesson
@ 2017-12-04 12:47 ` Anthony G. Basile
  2017-12-04 12:59   ` Marcus Folkesson
  0 siblings, 1 reply; 3+ messages in thread
From: Anthony G. Basile @ 2017-12-04 12:47 UTC (permalink / raw
  To: eudev

On 12/2/17 12:21 PM, Marcus Folkesson wrote:
> Solve a bug that could result in really nasty behavior.
>
> Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
> ---
>  src/udev/udev-event.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/udev/udev-event.c b/src/udev/udev-event.c
> index 19079bf02..4120c04f2 100644
> --- a/src/udev/udev-event.c
> +++ b/src/udev/udev-event.c
> @@ -201,7 +201,7 @@ subst:
>                          _s = s;
>                          _l = l;
>                          /* temporarily use sbuf */
> -                        s = &sbuf;
> +                        s = sbuf;
>                          l = UTIL_PATH_SIZE;
>                  }
>  


Do you know if this was caught upstream?

-- 
Anthony G. Basile, Ph.D.
Gentoo Linux Developer [Hardened]
E-Mail    : basile@freeharbor.net
GnuPG FP  : 1FED FAD9 D82C 52A5 3BAB  DC79 9384 FA6E F52D 4BBA
GnuPG ID  : F52D4BBA



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [eudev] [PATCH] udev-event.c: do not assign s to address to pointer
  2017-12-04 12:47 ` Anthony G. Basile
@ 2017-12-04 12:59   ` Marcus Folkesson
  0 siblings, 0 replies; 3+ messages in thread
From: Marcus Folkesson @ 2017-12-04 12:59 UTC (permalink / raw
  To: Anthony G. Basile; +Cc: eudev

[-- Attachment #1: Type: text/plain, Size: 1032 bytes --]

Hi,

On Mon, Dec 04, 2017 at 07:47:46AM -0500, Anthony G. Basile wrote:
> On 12/2/17 12:21 PM, Marcus Folkesson wrote:
> > Solve a bug that could result in really nasty behavior.
> >
> > Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
> > ---
> >  src/udev/udev-event.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/src/udev/udev-event.c b/src/udev/udev-event.c
> > index 19079bf02..4120c04f2 100644
> > --- a/src/udev/udev-event.c
> > +++ b/src/udev/udev-event.c
> > @@ -201,7 +201,7 @@ subst:
> >                          _s = s;
> >                          _l = l;
> >                          /* temporarily use sbuf */
> > -                        s = &sbuf;
> > +                        s = sbuf;
> >                          l = UTIL_PATH_SIZE;
> >                  }
> >  
> 
> 
> Do you know if this was caught upstream?
> 

It is not, 's' is later used in strpcpy() where memcpy() operates
directly on it.

Best regards
Marcus Folkesson



[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-12-04 12:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-02 17:21 [eudev] [PATCH] udev-event.c: do not assign s to address to pointer Marcus Folkesson
2017-12-04 12:47 ` Anthony G. Basile
2017-12-04 12:59   ` Marcus Folkesson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox