Commit 3b9a09d
committed
Add solv_fmemopen() function
The solv_xfopen_buf() function we have has the disadvantage
that it updates the buffer pointer/length when reading/writing.
This can easily lead to writing to locations that went out of
scope, like with our usage in testcase.c.
So solv_fmemopen() removes that indirection and directly takes
the buffer pointer and length as arguments. Only reading is
currently supported.1 parent 990f339 commit 3b9a09d
4 files changed
Lines changed: 29 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| 58 | + | |
58 | 59 | | |
59 | 60 | | |
60 | 61 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
798 | 798 | | |
799 | 799 | | |
800 | 800 | | |
| 801 | + | |
801 | 802 | | |
802 | 803 | | |
803 | 804 | | |
| |||
870 | 871 | | |
871 | 872 | | |
872 | 873 | | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
873 | 894 | | |
874 | 895 | | |
875 | 896 | | |
876 | | - | |
| 897 | + | |
877 | 898 | | |
878 | 899 | | |
879 | | - | |
880 | 900 | | |
881 | 901 | | |
882 | | - | |
883 | 902 | | |
884 | 903 | | |
885 | | - | |
| 904 | + | |
886 | 905 | | |
887 | | - | |
| 906 | + | |
888 | 907 | | |
889 | 908 | | |
890 | 909 | | |
891 | 910 | | |
892 | | - | |
| 911 | + | |
893 | 912 | | |
894 | 913 | | |
895 | 914 | | |
896 | | - | |
| 915 | + | |
897 | 916 | | |
898 | 917 | | |
899 | 918 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2071 | 2071 | | |
2072 | 2072 | | |
2073 | 2073 | | |
2074 | | - | |
| 2074 | + | |
2075 | 2075 | | |
2076 | 2076 | | |
2077 | 2077 | | |
| |||
0 commit comments