Commit f95067d
committed
Fix null pointer dereferences and improve message handling
- Added checks for null pointers in various message handling functions to prevent crashes when accessing optional fields.
- Updated the `AuthContext` to handle cases where the sender of a message may not be present.
- Modified `MessageExt` to safely access optional fields like `photo`, `sticker`, and `animation`.
- Enhanced error logging in `ROMBuildQueryHandler` to handle cases where query messages are null.
- Refactored `KernelBuildHandler` to use a new helper function for editing query messages, ensuring null checks are performed.
- Adjusted tests to accommodate changes in message handling, ensuring they correctly reference optional fields.1 parent b7137be commit f95067d
File tree
20 files changed
+264
-188
lines changed- src
- api
- builtin_modules/builder
- android
- kernel
- components
- command_modules
- llm
- global_handlers
- include/api
- ml
- third-party
- tests
- commands
20 files changed
+264
-188
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
28 | 32 | | |
29 | 33 | | |
30 | 34 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
30 | 32 | | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
44 | 47 | | |
45 | 48 | | |
46 | 49 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1160 | 1160 | | |
1161 | 1161 | | |
1162 | 1162 | | |
1163 | | - | |
1164 | | - | |
| 1163 | + | |
| 1164 | + | |
| 1165 | + | |
| 1166 | + | |
| 1167 | + | |
| 1168 | + | |
| 1169 | + | |
| 1170 | + | |
1165 | 1171 | | |
1166 | 1172 | | |
1167 | 1173 | | |
| |||
1176 | 1182 | | |
1177 | 1183 | | |
1178 | 1184 | | |
1179 | | - | |
1180 | | - | |
| 1185 | + | |
| 1186 | + | |
| 1187 | + | |
| 1188 | + | |
| 1189 | + | |
| 1190 | + | |
| 1191 | + | |
| 1192 | + | |
1181 | 1193 | | |
1182 | 1194 | | |
1183 | 1195 | | |
| |||
1189 | 1201 | | |
1190 | 1202 | | |
1191 | 1203 | | |
1192 | | - | |
1193 | | - | |
| 1204 | + | |
| 1205 | + | |
| 1206 | + | |
| 1207 | + | |
| 1208 | + | |
| 1209 | + | |
| 1210 | + | |
| 1211 | + | |
1194 | 1212 | | |
1195 | 1213 | | |
1196 | 1214 | | |
| |||
1209 | 1227 | | |
1210 | 1228 | | |
1211 | 1229 | | |
1212 | | - | |
1213 | | - | |
| 1230 | + | |
| 1231 | + | |
| 1232 | + | |
| 1233 | + | |
| 1234 | + | |
| 1235 | + | |
| 1236 | + | |
1214 | 1237 | | |
1215 | 1238 | | |
1216 | 1239 | | |
| |||
1221 | 1244 | | |
1222 | 1245 | | |
1223 | 1246 | | |
1224 | | - | |
1225 | | - | |
1226 | | - | |
| 1247 | + | |
| 1248 | + | |
| 1249 | + | |
| 1250 | + | |
| 1251 | + | |
| 1252 | + | |
| 1253 | + | |
| 1254 | + | |
1227 | 1255 | | |
1228 | 1256 | | |
1229 | 1257 | | |
| |||
1232 | 1260 | | |
1233 | 1261 | | |
1234 | 1262 | | |
1235 | | - | |
| 1263 | + | |
| 1264 | + | |
| 1265 | + | |
| 1266 | + | |
| 1267 | + | |
| 1268 | + | |
| 1269 | + | |
1236 | 1270 | | |
1237 | 1271 | | |
1238 | 1272 | | |
| |||
1241 | 1275 | | |
1242 | 1276 | | |
1243 | 1277 | | |
1244 | | - | |
1245 | | - | |
| 1278 | + | |
| 1279 | + | |
| 1280 | + | |
| 1281 | + | |
| 1282 | + | |
| 1283 | + | |
| 1284 | + | |
1246 | 1285 | | |
1247 | 1286 | | |
1248 | 1287 | | |
| |||
0 commit comments