Re: [PATCH 1/4] notmuch-opts.[ch]: new argument parsing framework for notmuch.

Subject: Re: [PATCH 1/4] notmuch-opts.[ch]: new argument parsing framework for notmuch.

Date: Tue, 06 Dec 2011 22:55:39 +0200

To: David Bremner, notmuch@notmuchmail.org

Cc: David Bremner

From: Jani Nikula


On Sun,  4 Dec 2011 11:47:52 -0400, David Bremner <david@tethera.net> wrote:
> +	    case NOTMUCH_OPT_INT:
> +		if (try->output_var)
> +		    *((int *)try->output_var) =
> +			atol (arg + strlen (try->name) +  1);

Looking at patch 4 and the existing handling of int params, I'd really
like this one to check that the string is non-empty and that all of the
string is parsed (and doesn't contain garbage at the end).

BR,
Jani.

Thread: