similar to: util_str.c patch

Displaying 20 results from an estimated 120 matches similar to: "util_str.c patch"

2007 Nov 14
2
lib/util_str.c:safe_strcpy ERROR: string overflow by 1
Hi, I've seeing the following error messages recorded in logwatch against samba in two FC6 XA-64 systems with samba 3.0.24-7. lib/util_str.c:safe_strcpy_fn(603) ERROR: string overflow by 1 (24 - 23) in safe_strcpy The main share in use on the first machine is via the guest account with Vista and XP clients, the other has more conventional shares with the Vista PC's as domain members
2017 Jun 19
0
[PATCH v7 13/13] daemon: Link guestfsd with libutils.
After the previous refactoring, we are able to link the daemon to common/utils, and also remove some of the "duplicate" functions that the daemon carried ("duplicate" in quotes because they were often not exact duplicates). Also this removes the duplicate reimplementation of (most) cleanup functions in the daemon, since those are provided by libutils now. It also allows us in
2020 Jan 09
0
[PATCH 5/7] python: replace guestfs_int_py_fromstringsize in Py2 branches
In Python 2 code branches use PyString_FromStringAndSize directly instead of the guestfs_int_py_fromstringsize wrapper (which calls PyString_FromStringAndSize anyway on Python < 3). --- generator/python.ml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/generator/python.ml b/generator/python.ml index 2a1a48fc0..0e1ed20d8 100644 --- a/generator/python.ml +++
2017 Mar 18
0
[PATCH] python: check return value of Python APIs
Addressing issue #1406906. When constructing the returned objects, check the return value of Python APIs. This is especially relevant when dealing with non UTF-8 strings. A RuntimeError will be raised on failure pointing to the problematic entry and the field name. Signed-off-by: Matteo Cafasso <noxdafox@gmail.com> --- generator/python.ml | 143
2017 Apr 25
1
[Bug #1406906] [PATCH] python: fix segmentation fault when setting non UTF-8 strings
When constructing the returned objects, check the return value of Python APIs. A RuntimeError will be raised on failure pointing to the problematic entry and the field name. Signed-off-by: Matteo Cafasso <noxdafox@gmail.com> --- generator/python.ml | 143 +++++++++++++++++++++++++++++++++++----------------- 1 file changed, 97 insertions(+), 46 deletions(-) diff --git
2015 Oct 20
3
[PATCH 1/2] generator: add a RelativePathnameList parameter type
Mostly like StringList (so it can used in current StringList parameters), but checking client- and daemon-side that the elements are relative paths. --- generator/bindtests.ml | 3 ++- generator/c.ml | 29 ++++++++++++++++++++++++----- generator/csharp.ml | 4 ++-- generator/daemon.ml | 20 ++++++++++++++++++-- generator/erlang.ml | 2 +- generator/fish.ml |
2017 May 09
0
[PATCH] python: add simple wrappers for PyObject<->string functions
The current need for #ifdef's based on the presence of PyString_FromString makes both the OCaml code of the generator, and the generated C code a mess to read. Hence, add three simple wrappers to make both the OCaml, and C code more readable, and easier to tweak in the future. --- generator/python.ml | 72 ++++++++++++----------------------------------------- python/handle.c | 52
2015 Oct 21
2
[PATCH 1/2] generator: add a FilenameList parameter type
Mostly like StringList (so it can used in current StringList parameters), but checking client- and daemon-side that the elements are file names. --- generator/bindtests.ml | 3 ++- generator/c.ml | 29 ++++++++++++++++++++++++----- generator/csharp.ml | 4 ++-- generator/daemon.ml | 20 ++++++++++++++++++-- generator/erlang.ml | 2 +- generator/fish.ml | 10
2014 Jan 10
0
[PATCH 5/7] perl: Properly decode node names, value keys from UTF-8
--- generator/generator.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generator/generator.ml b/generator/generator.ml index 6b1eef7..4119b04 100755 --- a/generator/generator.ml +++ b/generator/generator.ml @@ -2648,7 +2648,7 @@ DESTROY (h) pr " croak (\"%%s: %%s\", \"%s\", strerror (errno));\n" name;
2014 Jan 13
1
Re: [PATCH 5/7] perl: Properly decode node names, value keys from UTF-8
On Sat, Jan 11, 2014 at 12:12:50AM +0100, Hilko Bengen wrote: > --- > generator/generator.ml | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/generator/generator.ml b/generator/generator.ml > index 6b1eef7..4119b04 100755 > --- a/generator/generator.ml > +++ b/generator/generator.ml > @@ -2648,7 +2648,7 @@ DESTROY (h) > pr
2019 Jan 22
0
[PATCH v2 2/2] python: change types for RBufferOut/FBuffer with Python 3 (RHBZ#1661871)
So far RBufferOut return values, and FBuffer struct fields are 'str' on all the versions of Python. Python 3 distinguishes between 'str' (unicode strings), and 'bytes', with 'str' no more able to hold arbitrary data. For this reason, switch the return value of RBufferOut functions, and FBuffer struct fields to bytes on Python 3: while this is a potentially
2017 Apr 25
0
[PATCH] daemon: Use CLEANUP_* functions to avoid an explicit free in stub functions.
--- generator/daemon.ml | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/generator/daemon.ml b/generator/daemon.ml index b00627063..9d5ba00b2 100644 --- a/generator/daemon.ml +++ b/generator/daemon.ml @@ -155,13 +155,13 @@ let generate_daemon_stubs actions () = | RBool _ -> pr " int r;\n" | RConstString _ | RConstOptString _
2019 Jun 27
0
[PATCH 7/9] Rust bindings: Complete actions
From: Hiroyuki_Katsura <hiroyuki.katsura.0513@gmail.com> --- generator/rust.ml | 283 ++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 259 insertions(+), 24 deletions(-) diff --git a/generator/rust.ml b/generator/rust.ml index aa8b249ff..79e16dfc6 100644 --- a/generator/rust.ml +++ b/generator/rust.ml @@ -60,10 +60,11 @@ let generate_rust () = pr " use
2009 Nov 19
1
[PATCH libguestfs] syntax-check: expand TABs in generator.ml
>From 6f128e90afb055f9899011c4a592eb289e678936 Mon Sep 17 00:00:00 2001 From: Jim Meyering <meyering at redhat.com> Date: Thu, 19 Nov 2009 11:39:10 +0100 Subject: [PATCH libguestfs] syntax-check: expand TABs in generator.ml * src/generator.ml: Expand leading TABs to spaces. --- src/generator.ml | 46 +++++++++++++++++++++++----------------------- 1 files changed, 23 insertions(+), 23
2013 Dec 09
2
How can I find nonstandard or control characters in a large file?
I have a humongous csv file containing census data, far too big to read into RAM. I have been trying to extract individual columns from this file using the colbycol package. This works for certain subsets of the columns, but not for others. I have not yet been able to precisely identify the problem columns, as there are 731 columns and running colbycol on the file on my old slow machine takes
2019 Jun 27
0
[PATCH 4/9] Rust bindings: Add generator of structs
From: Hiroyuki_Katsura <hiroyuki.katsura.0513@gmail.com> --- generator/rust.ml | 87 +++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 85 insertions(+), 2 deletions(-) diff --git a/generator/rust.ml b/generator/rust.ml index 251eb1594..174f6ded3 100644 --- a/generator/rust.ml +++ b/generator/rust.ml @@ -29,13 +29,21 @@ open Structs open C open Events +let rec indent n =
2009 Aug 12
1
factorization would be nice
Hi Rich, I've changed part of generator.ml to look like this: (match snd style with | [] -> () | args -> pr " memset (&args, 0, sizeof args);\n"; pr "\n"; pr " if (!xdr_guestfs_%s_args (xdr_in, &args)) {\n" name; pr " reply_with_error (\"%%s: daemon failed to decode
2016 Apr 11
1
[PATCH] RFC: php: support PHP 7
Adapt to the API changes in the newer versions of the Zend framework, in particular regarding: - strings handling - resources handling (used for the guestfs_h pointer) - iterating in hash maps - data types for function arguments Introduce helper macros to reduce greatly the amount of #if's all around the generated C code. --- generator/php.ml | 96
2019 Jun 27
0
[PATCH 6/9] Rust bindings: Add generator of function signatures
From: Hiroyuki_Katsura <hiroyuki.katsura.0513@gmail.com> --- generator/rust.ml | 137 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 137 insertions(+) diff --git a/generator/rust.ml b/generator/rust.ml index a229d5eac..aa8b249ff 100644 --- a/generator/rust.ml +++ b/generator/rust.ml @@ -59,8 +59,10 @@ let generate_rust () = generate_header CStyle LGPLv2plus; pr
2019 Jun 27
0
Re: [PATCH 08/11] Rust bindings: Fix memory management and format the file
--- generator/rust.ml | 461 +++++++++++++++++++++++++++++++--------------- 1 file changed, 311 insertions(+), 150 deletions(-) diff --git a/generator/rust.ml b/generator/rust.ml index 79e16dfc6..ee65b1073 100644 --- a/generator/rust.ml +++ b/generator/rust.ml @@ -61,14 +61,16 @@ let generate_rust () = pr " use std::collections; use std::convert; +use std::convert::TryFrom; use