lkml.org 
[lkml]   [2002]   [Jan]   [2]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] C undefined behavior fix
FromFlorian Weimer <>
DateWed, 02 Jan 2002 11:29:20 +0100
Momchil Velikov <velco@fadata.bg> writes:

> -		strcpy(namep, RELOC("linux,phandle"));
> +		memcpy (namep, RELOC("linux,phandle"), sizeof("linux,phandle"));

Doesn't this still trigger undefined behavior, as far as the C
standard is concerned?  It's probably a better idea to fix the linker,
so that it performs proper relocation.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:15    [from the cache]
©2003-2008