Fix two NULL-deref

master
jvoisin 6 years ago committed by GitHub
parent ac0a722a10
commit ab03526620
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      airsonic-main/src/main/java/org/airsonic/player/controller/HLSController.java
  2. 2
      airsonic-main/src/main/java/org/airsonic/player/controller/StatusChartController.java

@ -71,7 +71,7 @@ public class HLSController {
response.setHeader("Access-Control-Allow-Origin", "*");
int id = ServletRequestUtils.getIntParameter(request, "id");
int id = ServletRequestUtils.getIntParameter(request, "id", 0);
MediaFile mediaFile = mediaFileService.getMediaFile(id);
Player player = playerService.getPlayer(request, response);
String username = player.getUsername();

@ -63,7 +63,7 @@ public class StatusChartController extends AbstractChartController {
@RequestMapping(method = RequestMethod.GET)
public synchronized ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response) throws Exception {
String type = request.getParameter("type");
int index = ServletRequestUtils.getIntParameter(request, "index");
int index = ServletRequestUtils.getIntParameter(request, "index", 0);
List<TransferStatus> statuses = Collections.emptyList();
if ("stream".equals(type)) {

Loading…
Cancel
Save