Re: [PATCH mmc-utils] fix GCC7 build by refactoring trimming routines

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Avri, hi Chris,

> > I got a compile error with GCC7. When trimming white spaces from strings
> > lsmmc uses strncpy with overlapping memory areas. This is not allowed.
> > In addition, the implementation was not efficient with calling strlen
> > and strncpy once per iteration. Refactor the code to be valid and more
> > effective.
> > 
> > Signed-off-by: Wolfram Sang <wsa+renesas@xxxxxxxxxxxxxxxxxxxx>
> > ---
> >  lsmmc.c | 16 +++++++++++-----
> >  1 file changed, 11 insertions(+), 5 deletions(-)
> > 
> > diff --git a/lsmmc.c b/lsmmc.c
> > index c4faa00..9737b37 100644
> > --- a/lsmmc.c
> > +++ b/lsmmc.c
> > @@ -316,8 +316,9 @@ int parse_ids(struct config *config)
> >  /* MMC/SD file parsing functions */
> >  char *read_file(char *name)
> >  {
> 
> See Uwe's note - https://www.spinics.net/lists/linux-mmc/msg51882.html

Thanks for the pointer. Chris, how do you feel with maintaining
mmc-utils? Would you maybe be willing to share maintenance with someone?

Happy hacking,

   Wolfram

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Memonry Technology]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux