Commit f54c5bd
imap-send: handle NULL return of next_arg()
next_arg() returns NULL if it runs out of arguments. Most call sites
already handle that gracefully. Check in the remaining cases as well.
Replace the NULL pointer with an empty string at the bottom of
get_cmd_result() -- it's nicely reported as an unexpected response a
few lines down. Error out explicitly at the remaining sites.
Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>1 parent 9752ad0 commit f54c5bd
1 file changed
+12
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
692 | 692 | | |
693 | 693 | | |
694 | 694 | | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
695 | 699 | | |
696 | 700 | | |
697 | 701 | | |
| |||
724 | 728 | | |
725 | 729 | | |
726 | 730 | | |
727 | | - | |
| 731 | + | |
| 732 | + | |
728 | 733 | | |
729 | 734 | | |
730 | 735 | | |
731 | 736 | | |
732 | 737 | | |
733 | 738 | | |
734 | 739 | | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
735 | 744 | | |
736 | 745 | | |
737 | 746 | | |
| |||
807 | 816 | | |
808 | 817 | | |
809 | 818 | | |
| 819 | + | |
| 820 | + | |
810 | 821 | | |
811 | 822 | | |
812 | 823 | | |
| |||
0 commit comments