Displaying 5 results from an estimated 5 matches for "parse_".
Did you mean:
parse
2000 Jan 26
0
coding volunteers needed for msrpc server-side API conversion
...as not to duplicate effort.
>
> 4) examine and follow the example code plus the coding STYLE, please.
> put copyright your name 2000 at the top of the file in the GPL header.
> istarted out by making 2 copies of rpc_server/srv_samr.c and then go from
> there. changes to rpc_parse/parse_*.c::make_r*() functions are sometimes
> necessary. changes to rpc_parse/parse_*.c::make_q*() functions are NOT
> necessary and should not be done.
>
> 5) send me a diff -u patch, they're far easier to read before doing patch
> -p0 < your_diff. send it as an attachment not i...
2019 Sep 23
0
Re: [PATCH nbdkit v2] server: public: Add nbdkit_parse_* functions for safely parsing integers.
...1,8 +152,11 @@ ssh_config (const char *key, const char *value)
> }
>
> else if (strcmp (key, "timeout") == 0) {
> - if (sscanf (value, "%ld", &timeout) != 1) {
> - nbdkit_error ("cannot parse timeout: %s", value);
> + if (nbdkit_parse_uint32_t ("timeout", value, &timeout) == -1)
> + return -1;
> + /* Because we have to cast it to long before calling the libssh API. */
> + if (timeout > LONG_MAX) {
> + nbdkit_error ("timeout too large");
C17 5.2.4.2.1 requires 'long'...
2019 Sep 23
0
Re: [PATCH nbdkit] server: public: Add nbdkit_parse_* functions for safely parsing integers.
On 9/23/19 12:52 PM, Richard W.M. Jones wrote:
> On Mon, Sep 23, 2019 at 12:05:11PM -0500, Eric Blake wrote:
>>> + int nbdkit_parse_long (const char *what, const char *str, long *r);
>>> + int nbdkit_parse_unsigned_long (const char *what,
>>> + const char *str, unsigned long *r);
>>
>> Do we really want to encourage the use of parse_long and
>> parse_unsigned_lo...
2019 Sep 23
2
[PATCH nbdkit v2] server: public: Add nbdkit_parse_* functions for safely parsing integers.
...long, unsigned_long, size_t and ssize_t, but added
int8_t and uint8_t.
Rich.
>From 375e286be27f563a9f1a886e29bdcfcebebfa81c Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Sat, 21 Sep 2019 07:30:40 +0100
Subject: [PATCH] server: public: Add nbdkit_parse_* functions for safely
parsing integers.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
sscanf is sadly not safe (because it doesn't handle integer overflow
correctly), and strto*l functions are a pain to use correctly.
Therefore add some functions to...
2019 Sep 23
2
Re: [PATCH nbdkit] server: public: Add nbdkit_parse_* functions for safely parsing integers.
On Mon, Sep 23, 2019 at 12:05:11PM -0500, Eric Blake wrote:
> > + int nbdkit_parse_long (const char *what, const char *str, long *r);
> > + int nbdkit_parse_unsigned_long (const char *what,
> > + const char *str, unsigned long *r);
>
> Do we really want to encourage the use of parse_long and
> parse_unsigned_long? Those differ...