On Fri, Jan 09, 2009 at 01:47:02PM -0500, Valerie Aurora Henson wrote:
> 
> --- a/daemon/direct.c
> +++ b/daemon/direct.c
> @@ -742,11 +742,9 @@ int mount_autofs_offset(struct autofs_point *ap, struct 
> mapent *me, const char *
>  
>       type = ap->entry->maps->type;
>       if (type && !strcmp(ap->entry->maps->type, "hosts")) {
> -             char *tmp = alloca(7);
> -             if (tmp) {
> -                     strcpy(tmp, "-hosts");
> -                     map_name = (const char *) tmp;
> -             }
> +             char tmp[7];
> +             strcpy(tmp, "-hosts");
> +             map_name = (const char *) tmp;
>       } else
>               map_name = me->mc->map->argv[0];
>  

tmp is being accessed outside of the scope it is declared in, I'll fix
that too.

-VAL

_______________________________________________
autofs mailing list
autofs@linux.kernel.org
http://linux.kernel.org/mailman/listinfo/autofs

Reply via email to