@@ -58,7 +58,7 @@ static int recvline_fh(FILE *helper, struct strbuf *buffer, const char *name)
58
58
if (strbuf_getline (buffer , helper , '\n' ) == EOF ) {
59
59
if (debug )
60
60
fprintf (stderr , "Debug: Remote helper quit.\n" );
61
- exit ( 128 ) ;
61
+ return 1 ;
62
62
}
63
63
64
64
if (debug )
@@ -157,7 +157,8 @@ static struct child_process *get_helper(struct transport *transport)
157
157
while (1 ) {
158
158
const char * capname ;
159
159
int mandatory = 0 ;
160
- recvline (data , & buf );
160
+ if (recvline (data , & buf ))
161
+ exit (128 );
161
162
162
163
if (!* buf .buf )
163
164
break ;
@@ -302,7 +303,8 @@ static int set_helper_option(struct transport *transport,
302
303
strbuf_addch (& buf , '\n' );
303
304
304
305
sendline (data , & buf );
305
- recvline (data , & buf );
306
+ if (recvline (data , & buf ))
307
+ exit (128 );
306
308
307
309
if (!strcmp (buf .buf , "ok" ))
308
310
ret = 0 ;
@@ -374,7 +376,8 @@ static int fetch_with_fetch(struct transport *transport,
374
376
sendline (data , & buf );
375
377
376
378
while (1 ) {
377
- recvline (data , & buf );
379
+ if (recvline (data , & buf ))
380
+ exit (128 );
378
381
379
382
if (starts_with (buf .buf , "lock " )) {
380
383
const char * name = buf .buf + 5 ;
@@ -558,7 +561,9 @@ static int process_connect_service(struct transport *transport,
558
561
goto exit ;
559
562
560
563
sendline (data , & cmdbuf );
561
- recvline_fh (input , & cmdbuf , name );
564
+ if (recvline_fh (input , & cmdbuf , name ))
565
+ exit (128 );
566
+
562
567
if (!strcmp (cmdbuf .buf , "" )) {
563
568
data -> no_disconnect_req = 1 ;
564
569
if (debug )
@@ -743,7 +748,8 @@ static void push_update_refs_status(struct helper_data *data,
743
748
for (;;) {
744
749
char * private ;
745
750
746
- recvline (data , & buf );
751
+ if (recvline (data , & buf ))
752
+ exit (128 );
747
753
if (!buf .len )
748
754
break ;
749
755
@@ -969,7 +975,8 @@ static struct ref *get_refs_list(struct transport *transport, int for_push)
969
975
970
976
while (1 ) {
971
977
char * eov , * eon ;
972
- recvline (data , & buf );
978
+ if (recvline (data , & buf ))
979
+ exit (128 );
973
980
974
981
if (!* buf .buf )
975
982
break ;
0 commit comments