Fix possible crash when using syncevolution plugin
Luiz Augusto von Dentz
maintainerPATCH 1/1 Fix possible crash when using syncevolution plugin
From: Luiz Augusto von Dentz <[email protected]>
Context os need to be set since synce_write uses it, in addiction check if context is valid in synce_open.
--- plugins/syncevolution.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-)
plugins/syncevolution.c +4 -1
@@ -230,6 +230,7 @@ static void *synce_connect(struct obex_session *os, int *err) context->dbus_conn = conn; context->lasterr = -EAGAIN ; context->id =obex_get_id (os); + context->os = os;if (err) *err =0 ;
@@ -281,8 +282,10 @@ static void synce_disconnect(struct obex_session *os, void *user_data)static void *synce_open (const char *name,int oflag,mode_t mode,void *user_data,size_t *size,int *err) { +struct synce_context *context = user_data; +if (err) - *err =0 ; + *err = context ?0 : -EFAULT ;return user_data; }
Signature · 1 line
1.7.6.4
Johan Hedberg
AppliedHi Luiz,
Quoted 5 lines · Luiz Augusto von Dentz
Context os need to be set since
synce_writeuses it, in addiction check if context is valid insynce_open.--- plugins/syncevolution.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-)
Applied. Thanks.
Johan