[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [PATCH libvirt-python 13/17] Remove use of virStrcpyStatic



From: "Daniel P. Berrange" <berrange redhat com>

Signed-off-by: Daniel P. Berrange <berrange redhat com>
---
 libvirt-override.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libvirt-override.c b/libvirt-override.c
index c2c1c18..0bf6512 100644
--- a/libvirt-override.c
+++ b/libvirt-override.c
@@ -220,7 +220,8 @@ setPyVirTypedParameter(PyObject *info,
             goto cleanup;
         }
 
-        ignore_value(virStrcpyStatic(temp->field, keystr));
+	strncpy(temp->field, keystr, sizeof(temp->field)-1);
+	temp->field[sizeof(temp->field)-1] = '\0';
         temp->type = params[i].type;
 
         switch (params[i].type) {
-- 
1.8.3.1


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]