code
stringlengths
14
2.05k
label
int64
0
1
programming_language
stringclasses
7 values
cwe_id
stringlengths
6
14
cwe_name
stringlengths
5
98
description
stringlengths
36
379
url
stringlengths
36
48
label_name
stringclasses
2 values
public IRouter getSatelliteRouter(int x, int y) { if(x == -1 && y == -1) { for (final BaseLogicSatellite satellite : BaseLogicSatellite.AllSatellites) { if (satellite.satelliteId == satelliteId) { CoreRoutedPipe satPipe = satellite.getRoutedPipe(); if(satPipe == null || satPipe.stillNeedReplace() || satPipe.getRouter() == null) continue; return satPipe.getRouter(); } } } else if(y == -1) { for (final BaseLogicSatellite satellite : BaseLogicSatellite.AllSatellites) { if (satellite.satelliteId == advancedSatelliteIdArray[x]) { CoreRoutedPipe satPipe = satellite.getRoutedPipe(); if(satPipe == null || satPipe.stillNeedReplace() || satPipe.getRouter() == null) continue; return satPipe.getRouter(); } } } else { //TODO } return null; }
1
Java
CWE-502
Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
https://cwe.mitre.org/data/definitions/502.html
safe
public void setNextSatellite(EntityPlayer player) { if (MainProxy.isClient(player.worldObj)) { final PacketCoordinates packet = new PacketCoordinates(NetworkConstants.CRAFTING_PIPE_NEXT_SATELLITE, xCoord, yCoord, zCoord); MainProxy.sendPacketToServer(packet.getPacket()); } else { satelliteId = getNextConnectSatelliteId(false, -1, -1); final PacketPipeInteger packet = new PacketPipeInteger(NetworkConstants.CRAFTING_PIPE_SATELLITE_ID, xCoord, yCoord, zCoord, satelliteId); MainProxy.sendPacketToPlayer(packet.getPacket(), (Player)player); } }
1
Java
CWE-502
Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
https://cwe.mitre.org/data/definitions/502.html
safe
public void setSatelliteId(int satelliteId, int x, int y) { if(x == -1 && y == -1) { this.satelliteId = satelliteId; } else if(y == -1) { advancedSatelliteIdArray[x] = satelliteId; } else { //TODO } }
1
Java
CWE-502
Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
https://cwe.mitre.org/data/definitions/502.html
safe
protected int getNextConnectSatelliteId(boolean prev, int x, int y) { final List<ExitRoute> routes = getRoutedPipe().getRouter().getIRoutersByCost(); int closestIdFound = prev ? 0 : Integer.MAX_VALUE; for (final BaseLogicSatellite satellite : BaseLogicSatellite.AllSatellites) { CoreRoutedPipe satPipe = satellite.getRoutedPipe(); if(satPipe == null || satPipe.stillNeedReplace() || satPipe.getRouter() == null) continue; IRouter satRouter = satPipe.getRouter(); for (ExitRoute route:routes){ if (route.destination == satRouter) { if(x == -1 && y == -1) { if (!prev && satellite.satelliteId > satelliteId && satellite.satelliteId < closestIdFound) { closestIdFound = satellite.satelliteId; } else if (prev && satellite.satelliteId < satelliteId && satellite.satelliteId > closestIdFound) { closestIdFound = satellite.satelliteId; } } else if(y == -1) { if (!prev && satellite.satelliteId > advancedSatelliteIdArray[x] && satellite.satelliteId < closestIdFound) { closestIdFound = satellite.satelliteId; } else if (prev && satellite.satelliteId < advancedSatelliteIdArray[x] && satellite.satelliteId > closestIdFound) { closestIdFound = satellite.satelliteId; } } else { //TODO } } } } if (closestIdFound == Integer.MAX_VALUE) { if(x == -1 && y == -1) { return satelliteId; } else if(y == -1) { return advancedSatelliteIdArray[x]; } else { //TODO } } return closestIdFound; }
1
Java
CWE-502
Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
https://cwe.mitre.org/data/definitions/502.html
safe
public void onWrenchClicked(EntityPlayer entityplayer) { if (MainProxy.isServer(entityplayer.worldObj)) { MainProxy.sendPacketToPlayer(new GuiArgumentPacket(GuiIDs.GUI_CRAFTINGPIPE_ID, new Object[]{((CoreRoutedPipe)this.container.pipe).getUpgradeManager().isAdvancedSatelliteCrafter(), ((CoreRoutedPipe)this.container.pipe).getUpgradeManager().isSatelliteCraftingCrafter()}).getPacket(), (Player) entityplayer); entityplayer.openGui(LogisticsPipes.instance, GuiIDs.GUI_CRAFTINGPIPE_ID, worldObj, xCoord, yCoord, zCoord); } }
1
Java
CWE-502
Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
https://cwe.mitre.org/data/definitions/502.html
safe
public void setPrevSatellite(EntityPlayer player) { if (MainProxy.isClient(player.worldObj)) { final PacketCoordinates packet = new PacketCoordinates(NetworkConstants.CRAFTING_PIPE_PREV_SATELLITE, xCoord, yCoord, zCoord); MainProxy.sendPacketToServer(packet.getPacket()); } else { satelliteId = getNextConnectSatelliteId(true, -1, -1); final PacketPipeInteger packet = new PacketPipeInteger(NetworkConstants.CRAFTING_PIPE_SATELLITE_ID, xCoord, yCoord, zCoord, satelliteId); MainProxy.sendPacketToPlayer(packet.getPacket(), (Player)player); } }
1
Java
CWE-502
Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
https://cwe.mitre.org/data/definitions/502.html
safe
public void setNextSatellite(EntityPlayer player, int i) { if (MainProxy.isClient(player.worldObj)) { final PacketCoordinates packet = new PacketPipeInteger(NetworkConstants.CRAFTING_PIPE_NEXT_SATELLITE_ADVANCED, xCoord, yCoord, zCoord, i); MainProxy.sendPacketToServer(packet.getPacket()); } else { advancedSatelliteIdArray[i] = getNextConnectSatelliteId(false, i, -1); final PacketModuleInteger packet = new PacketModuleInteger(NetworkConstants.CRAFTING_PIPE_SATELLITE_ID_ADVANCED, xCoord, yCoord, zCoord, i, advancedSatelliteIdArray[i]); MainProxy.sendPacketToPlayer(packet.getPacket(), (Player)player); } }
1
Java
CWE-502
Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
https://cwe.mitre.org/data/definitions/502.html
safe
public boolean isSatelliteConnected() { final List<ExitRoute> routes = getRoutedPipe().getRouter().getIRoutersByCost(); if(!((CoreRoutedPipe)this.container.pipe).getUpgradeManager().isAdvancedSatelliteCrafter()) { if(satelliteId == 0) return true; for (final BaseLogicSatellite satellite : BaseLogicSatellite.AllSatellites) { if (satellite.satelliteId == satelliteId) { CoreRoutedPipe satPipe = satellite.getRoutedPipe(); if(satPipe == null || satPipe.stillNeedReplace() || satPipe.getRouter() == null) continue; IRouter satRouter = satPipe.getRouter(); for (ExitRoute route:routes) { if (route.destination == satRouter) { return true; } } } } } else { boolean foundAll = true; for(int i=0;i<9;i++) { boolean foundOne = false; if(advancedSatelliteIdArray[i] == 0) { continue; } for (final BaseLogicSatellite satellite : BaseLogicSatellite.AllSatellites) { if (satellite.satelliteId == advancedSatelliteIdArray[i]) { CoreRoutedPipe satPipe = satellite.getRoutedPipe(); if(satPipe == null || satPipe.stillNeedReplace() || satPipe.getRouter() == null) continue; IRouter satRouter = satPipe.getRouter(); for (ExitRoute route:routes) { if (route.destination == satRouter) { foundOne = true; break; } } } } foundAll &= foundOne; } return foundAll; } return false; }
1
Java
CWE-502
Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
https://cwe.mitre.org/data/definitions/502.html
safe
public void setPrevSatellite(EntityPlayer player, int i) { if (MainProxy.isClient(player.worldObj)) { final PacketCoordinates packet = new PacketPipeInteger(NetworkConstants.CRAFTING_PIPE_PREV_SATELLITE_ADVANCED, xCoord, yCoord, zCoord, i); MainProxy.sendPacketToServer(packet.getPacket()); } else { advancedSatelliteIdArray[i] = getNextConnectSatelliteId(true, i, -1); final PacketModuleInteger packet = new PacketModuleInteger(NetworkConstants.CRAFTING_PIPE_SATELLITE_ID_ADVANCED, xCoord, yCoord, zCoord, i, advancedSatelliteIdArray[i]); MainProxy.sendPacketToPlayer(packet.getPacket(), (Player)player); } }
1
Java
CWE-502
Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
https://cwe.mitre.org/data/definitions/502.html
safe
public Pair<Integer, Integer> getBestReply(LiquidStack stack, IRouter sourceRouter, List<Integer> jamList) { for (ExitRoute candidateRouter : sourceRouter.getIRoutersByCost()){ if(!candidateRouter.containsFlag(PipeRoutingConnectionType.canRouteTo)) continue; if(candidateRouter.destination.getSimpleID() == sourceRouter.getSimpleID()) continue; if(jamList.contains(candidateRouter.destination.getSimpleID())) continue; if (candidateRouter.destination.getPipe() == null || !candidateRouter.destination.getPipe().isEnabled()) continue; CoreRoutedPipe pipe = candidateRouter.destination.getPipe(); if(!(pipe instanceof ILiquidSink)) continue; int amount = ((ILiquidSink)pipe).sinkAmount(stack); if(amount > 0) { Pair<Integer, Integer> result = new Pair<Integer, Integer>(candidateRouter.destination.getSimpleID(), amount); return result; } } Pair<Integer, Integer> result = new Pair<Integer, Integer>(0, 0); return result; }
1
Java
CWE-502
Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
https://cwe.mitre.org/data/definitions/502.html
safe
private static void onCraftingPipeSetSatellite(PacketPipeInteger packet) { final TileGenericPipe pipe = getPipe(FMLClientHandler.instance().getClient().theWorld, packet.posX, packet.posY, packet.posZ); if (pipe == null) { return; } if (!(pipe.pipe.logic instanceof BaseLogicCrafting)) { return; } ((BaseLogicCrafting) pipe.pipe.logic).setSatelliteId(packet.integer, -1, -1); }
1
Java
CWE-502
Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
https://cwe.mitre.org/data/definitions/502.html
safe
private static void onCraftingPipeSetSatelliteAdvanced(PacketModuleInteger packet) { final TileGenericPipe pipe = getPipe(FMLClientHandler.instance().getClient().theWorld, packet.posX, packet.posY, packet.posZ); if (pipe == null) { return; } if (!(pipe.pipe.logic instanceof BaseLogicCrafting)) { return; } ((BaseLogicCrafting) pipe.pipe.logic).setSatelliteId(packet.integer, packet.slot, -1); }
1
Java
CWE-502
Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
https://cwe.mitre.org/data/definitions/502.html
safe
private static void onCraftingPipeNextSatelliteAdvanced(EntityPlayerMP player, PacketPipeInteger packet) { final TileGenericPipe pipe = getPipe(player.worldObj, packet.posX, packet.posY, packet.posZ); if (pipe == null) { return; } if (!(pipe.pipe.logic instanceof BaseLogicCrafting)) { return; } ((BaseLogicCrafting) pipe.pipe.logic).setNextSatellite(player, packet.integer); }
1
Java
CWE-502
Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
https://cwe.mitre.org/data/definitions/502.html
safe
private static void onCraftingPipePrevSatelliteAdvanced(EntityPlayerMP player, PacketPipeInteger packet) { final TileGenericPipe pipe = getPipe(player.worldObj, packet.posX, packet.posY, packet.posZ); if (pipe == null) { return; } if (!(pipe.pipe.logic instanceof BaseLogicCrafting)) { return; } ((BaseLogicCrafting) pipe.pipe.logic).setPrevSatellite(player, packet.integer); }
1
Java
CWE-502
Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
https://cwe.mitre.org/data/definitions/502.html
safe
public void readData(DataInputStream data) throws IOException { guiID = data.readInt(); int size = data.readInt(); args = new Object[size]; for(int i=0; i < size;i++) { int arraySize = data.readInt(); byte[] bytes = new byte[arraySize]; data.read(bytes); ByteArrayInputStream bis = new ByteArrayInputStream(bytes); ObjectInput in = null; in = new ObjectInputStream(bis); try { Object o = in.readObject(); args[i] = o; } catch (ClassNotFoundException e) { throw new UnsupportedOperationException(e); } } }
1
Java
CWE-502
Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
https://cwe.mitre.org/data/definitions/502.html
safe
public int getID() { return NetworkConstants.GUI_ARGUMENT_PACKET; }
1
Java
CWE-502
Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
https://cwe.mitre.org/data/definitions/502.html
safe
public void writeData(DataOutputStream data) throws IOException { data.writeInt(guiID); data.writeInt(args.length); for(int i=0; i<args.length;i++) { ByteArrayOutputStream bos = new ByteArrayOutputStream(); ObjectOutput out = null; out = new ObjectOutputStream(bos); out.writeObject(args[i]); byte[] bytes = bos.toByteArray(); data.writeInt(bytes.length); data.write(bytes); } }
1
Java
CWE-502
Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
https://cwe.mitre.org/data/definitions/502.html
safe
public GuiArgumentPacket() { super(); }
1
Java
CWE-502
Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
https://cwe.mitre.org/data/definitions/502.html
safe
public GuiArgumentPacket(int Id, Object... arg) { super(); args = arg; guiID = Id; }
1
Java
CWE-502
Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
https://cwe.mitre.org/data/definitions/502.html
safe
public CraftingTemplate addCrafting() { if (!isEnabled()){ return null; } BaseLogicCrafting craftingLogic = (BaseLogicCrafting) this.logic; ItemStack stack = craftingLogic.getCraftedItem(); if (stack == null) return null; IRequestItems[] target = new IRequestItems[9]; for(int i=0;i<9;i++) { target[i] = this; } boolean hasSatellite = craftingLogic.isSatelliteConnected(); if(!hasSatellite) return null; if(!getUpgradeManager().isAdvancedSatelliteCrafter()) { if(craftingLogic.satelliteId != 0) { IRequestItems sat = (IRequestItems)craftingLogic.getSatelliteRouter(-1, -1).getPipe(); for(int i=6;i<9;i++) { target[i] = sat; } } } else { for(int i=0;i<9;i++) { if(craftingLogic.advancedSatelliteIdArray[i] != 0) { target[i] = (IRequestItems)craftingLogic.getSatelliteRouter(i, -1).getPipe(); } } } CraftingTemplate template = new CraftingTemplate(ItemIdentifierStack.GetFromStack(stack), this, craftingLogic.priority); //Check all materials for (int i = 0; i < 9; i++){ ItemStack resourceStack = craftingLogic.getMaterials(i); if (resourceStack == null || resourceStack.stackSize == 0) continue; template.addRequirement(ItemIdentifierStack.GetFromStack(resourceStack), target[i]); } return template; }
1
Java
CWE-502
Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
https://cwe.mitre.org/data/definitions/502.html
safe
public Set<ItemIdentifier> getSpecificInterests() { Set<ItemIdentifier> l1 = new TreeSet<ItemIdentifier>();; for(Pair<TileEntity, ForgeDirection> pair:getAdjacentTanks(false)) { ILiquidTank[] tanks = ((ITankContainer)pair.getValue1()).getTanks(pair.getValue2().getOpposite()); for(ILiquidTank tank:tanks) { LiquidStack liquid; if((liquid = tank.getLiquid()) != null && liquid.itemID != 0) { LiquidIdentifier ident = LiquidIdentifier.get(liquid); l1.add(ident.getItemIdentifier()); } } } return l1; }
1
Java
CWE-502
Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
https://cwe.mitre.org/data/definitions/502.html
safe
public boolean isAllowed(CoreRoutedPipe pipe) { return pipe instanceof PipeItemsCraftingLogistics; }
1
Java
CWE-502
Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
https://cwe.mitre.org/data/definitions/502.html
safe
public boolean needsUpdate() { return false; }
1
Java
CWE-502
Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
https://cwe.mitre.org/data/definitions/502.html
safe
public boolean isAllowed(CoreRoutedPipe pipe) { return true; }
1
Java
CWE-502
Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
https://cwe.mitre.org/data/definitions/502.html
safe
public boolean isAllowed(CoreRoutedPipe pipe) { return true; }
1
Java
CWE-502
Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
https://cwe.mitre.org/data/definitions/502.html
safe
public boolean isAllowed(CoreRoutedPipe pipe) { return true; }
1
Java
CWE-502
Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
https://cwe.mitre.org/data/definitions/502.html
safe
public boolean needsUpdate() { return false; }
1
Java
CWE-502
Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
https://cwe.mitre.org/data/definitions/502.html
safe
public boolean isAllowed(CoreRoutedPipe pipe) { return pipe instanceof PipeItemsCraftingLogistics; }
1
Java
CWE-502
Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
https://cwe.mitre.org/data/definitions/502.html
safe
public boolean isAllowed(CoreRoutedPipe pipe) { return pipe instanceof PipeItemsSatelliteLogistics; }
1
Java
CWE-502
Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
https://cwe.mitre.org/data/definitions/502.html
safe
public boolean needsUpdate() { return false; }
1
Java
CWE-502
Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
https://cwe.mitre.org/data/definitions/502.html
safe
public boolean isSatelliteCraftingCrafter() { return isSatelliteCraftingCrafter; }
1
Java
CWE-502
Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
https://cwe.mitre.org/data/definitions/502.html
safe
public DummyContainer getDummyContainer(EntityPlayer player) { DummyContainer dummy = new DummyContainer(player.inventory, inv); dummy.addNormalSlotsForPlayerInventory(8, 60); //Pipe slots for(int pipeSlot = 0; pipeSlot < 8; pipeSlot++){ dummy.addRestrictedSlot(pipeSlot, inv, 8 + pipeSlot * 18, 18, new ISlotCheck() { @Override public boolean isStackAllowed(ItemStack itemStack) { if(itemStack == null) return false; if(itemStack.itemID == LogisticsPipes.UpgradeItem.itemID) { if(!LogisticsPipes.UpgradeItem.getUpgradeForItem(itemStack, null).isAllowed(pipe)) return false; } else { return false; } return true; } }); } dummy.addRestrictedSlot(8, inv, 8 + 8 * 18, 18, new ISlotCheck() { @Override public boolean isStackAllowed(ItemStack itemStack) { if(itemStack == null) return false; if(itemStack.itemID != LogisticsPipes.LogisticsItemCard.itemID) return false; if(itemStack.getItemDamage() != LogisticsItemCard.SEC_CARD) return false; return true; } }); return dummy; }
1
Java
CWE-502
Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
https://cwe.mitre.org/data/definitions/502.html
safe
public void InventoryChanged(SimpleInventory inventory) { boolean needUpdate = false; for(int i=0;i<inv.getSizeInventory() - 1;i++) { ItemStack item = inv.getStackInSlot(i); if(item != null) { needUpdate |= updateModule(i); } else if(item == null && upgrades[i] != null) { needUpdate |= removeUpgrade(i); } } //update sneaky direction, speed upgrade count and disconnection sneakyOrientation = ForgeDirection.UNKNOWN; speedUpgradeCount = 0; isAdvancedCrafter = false; isSatelliteCraftingSatellite = false; isSatelliteCraftingCrafter = false; disconnectedSides.clear(); for(int i=0;i<upgrades.length;i++) { IPipeUpgrade upgrade = upgrades[i]; if(upgrade instanceof SneakyUpgrade && sneakyOrientation == ForgeDirection.UNKNOWN) { sneakyOrientation = ((SneakyUpgrade) upgrade).getSneakyOrientation(); } else if(upgrade instanceof SpeedUpgrade) { speedUpgradeCount += inv.getStackInSlot(i).stackSize; } else if(upgrade instanceof ConnectionUpgrade) { disconnectedSides.add(((ConnectionUpgrade)upgrade).getSide()); } else if(upgrade instanceof SplitCraftingCrafterUpgrade) { isSatelliteCraftingCrafter = true; } else if(upgrade instanceof SplitCraftingSatelliteUpgrade) { isSatelliteCraftingSatellite = true; } else if(upgrade instanceof AdvancedSatelliteUpgrade) { isAdvancedCrafter = true; } } if(needUpdate) { pipe.connectionUpdate(); } }
1
Java
CWE-502
Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
https://cwe.mitre.org/data/definitions/502.html
safe
public boolean tryIserting(World world, EntityPlayer entityplayer) { if(entityplayer.getCurrentEquippedItem() != null && entityplayer.getCurrentEquippedItem().itemID == LogisticsPipes.UpgradeItem.itemID && LogisticsPipes.UpgradeItem.getUpgradeForItem(entityplayer.getCurrentEquippedItem(), null).isAllowed(pipe)) { if(MainProxy.isClient(world)) return true; for(int i=0;i<inv.getSizeInventory() - 1;i++) { ItemStack item = inv.getStackInSlot(i); if(item == null) { inv.setInventorySlotContents(i, entityplayer.getCurrentEquippedItem().splitStack(1)); InventoryChanged(inv); return true; } else if(item.getItemDamage() == entityplayer.getCurrentEquippedItem().getItemDamage()) { if(item.stackSize < inv.getInventoryStackLimit()) { item.stackSize++; entityplayer.getCurrentEquippedItem().splitStack(1); return true; } } } } if(entityplayer.getCurrentEquippedItem() != null && entityplayer.getCurrentEquippedItem().itemID == LogisticsPipes.LogisticsItemCard.itemID && entityplayer.getCurrentEquippedItem().getItemDamage() == LogisticsItemCard.SEC_CARD) { if(MainProxy.isClient(world)) return true; if(inv.getStackInSlot(8) == null) { inv.setInventorySlotContents(8, entityplayer.getCurrentEquippedItem().copy()); inv.getStackInSlot(8).stackSize = 1; entityplayer.getCurrentEquippedItem().splitStack(1); return true; } } return false; }
1
Java
CWE-502
Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
https://cwe.mitre.org/data/definitions/502.html
safe
public boolean isSatelliteCraftingSatellite() { return isSatelliteCraftingSatellite; }
1
Java
CWE-502
Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
https://cwe.mitre.org/data/definitions/502.html
safe
public boolean isAdvancedSatelliteCrafter() { return isAdvancedCrafter; }
1
Java
CWE-502
Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
https://cwe.mitre.org/data/definitions/502.html
safe
public static void drawBigSlotBackground(Minecraft mc, int x, int y) { int i = mc.renderEngine.getTexture("/logisticspipes/gui/slot-big.png"); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); mc.renderEngine.bindTexture(i); Tessellator var9 = Tessellator.instance; var9.startDrawingQuads(); var9.addVertexWithUV(x , y + 26 , (double)zLevel, 0 , 1); var9.addVertexWithUV(x + 26 , y + 26 , (double)zLevel, 1 , 1); var9.addVertexWithUV(x + 26 , y , (double)zLevel, 1 , 0); var9.addVertexWithUV(x , y , (double)zLevel, 0 , 0); var9.draw(); }
1
Java
CWE-502
Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
https://cwe.mitre.org/data/definitions/502.html
safe
public void writeToLPData(LPDataOutput output) { output.writeLongArray(amountRecorded); output.writeInt(arrayPos); output.writeItemIdentifier(item); }
1
Java
CWE-502
Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
https://cwe.mitre.org/data/definitions/502.html
safe
public void readFromLPData(LPDataInput input) { amountRecorded = input.readLongArray(); arrayPos = input.readInt(); item = input.readItemIdentifier(); }
1
Java
CWE-502
Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
https://cwe.mitre.org/data/definitions/502.html
safe
public void setUseNewRenderer(boolean flag) { useNewRenderer = flag; }
1
Java
CWE-502
Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
https://cwe.mitre.org/data/definitions/502.html
safe
public void readData(LPDataInput input) { useNewRenderer = input.readBoolean(); useFallbackRenderer = input.readBoolean(); renderPipeDistance = input.readInt(); renderPipeContentDistance = input.readInt(); isUninitialised = false; }
1
Java
CWE-502
Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
https://cwe.mitre.org/data/definitions/502.html
safe
public void writeData(LPDataOutput output) { output.writeBoolean(useNewRenderer); output.writeBoolean(useFallbackRenderer); output.writeInt(renderPipeDistance); output.writeInt(renderPipeContentDistance); }
1
Java
CWE-502
Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
https://cwe.mitre.org/data/definitions/502.html
safe
private NewGuiHandler() { }
1
Java
CWE-502
Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
https://cwe.mitre.org/data/definitions/502.html
safe
public void handlerAdded(ChannelHandlerContext ctx) throws Exception { super.handlerAdded(ctx); ctx.attr(PacketHandler.INBOUNDPACKETTRACKER).set(new ThreadLocal<>()); }
1
Java
CWE-502
Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
https://cwe.mitre.org/data/definitions/502.html
safe
private static void onPacketData(ModernPacket packet, final EntityPlayer player) { try { packet.processPacket(player); if (LPConstants.DEBUG) { PacketHandler.debugMap.remove(packet.getDebugId()); } } catch (DelayPacketException e) { if (packet.retry() && MainProxy.isClient(player.getEntityWorld())) { SimpleServiceLocator.clientBufferHandler.queueFailedPacket(packet, player); } else if (LPConstants.DEBUG) { LogisticsPipes.log.error(packet.getClass().getName()); LogisticsPipes.log.error(packet.toString()); e.printStackTrace(); } } catch (Exception e) { throw new RuntimeException(e); } }
1
Java
CWE-502
Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
https://cwe.mitre.org/data/definitions/502.html
safe
public static void onPacketData(final LPDataInput data, final EntityPlayer player) { if (player == null) { return; } final int packetID = data.readShort(); final ModernPacket packet = PacketHandler.packetlist.get(packetID).template(); packet.setDebugId(data.readInt()); packet.readData(data); PacketHandler.onPacketData(packet, player); }
1
Java
CWE-502
Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
https://cwe.mitre.org/data/definitions/502.html
safe
InboundModernPacketWrapper(ModernPacket p, EntityPlayer e) { packet = p; player = e; }
1
Java
CWE-502
Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
https://cwe.mitre.org/data/definitions/502.html
safe
public void writeData(LPDataOutput output) { super.writeData(output); output.writeBoolean(flag); }
1
Java
CWE-502
Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
https://cwe.mitre.org/data/definitions/502.html
safe
public void readData(LPDataInput input) { super.readData(input); flag = input.readBoolean(); }
1
Java
CWE-502
Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
https://cwe.mitre.org/data/definitions/502.html
safe
public BooleanModuleCoordinatesGuiProvider(int id) { super(id); }
1
Java
CWE-502
Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
https://cwe.mitre.org/data/definitions/502.html
safe
public void writeData(LPDataOutput output) { output.writeInt(posX); output.writeInt(posY); output.writeInt(posZ); }
1
Java
CWE-502
Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
https://cwe.mitre.org/data/definitions/502.html
safe
public void readData(LPDataInput input) { posX = input.readInt(); posY = input.readInt(); posZ = input.readInt(); }
1
Java
CWE-502
Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
https://cwe.mitre.org/data/definitions/502.html
safe
public CoordinatesGuiProvider(int id) { super(id); }
1
Java
CWE-502
Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
https://cwe.mitre.org/data/definitions/502.html
safe
public void readData(LPDataInput input) { posX = input.readInt(); posY = input.readInt(); posZ = input.readInt(); }
1
Java
CWE-502
Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
https://cwe.mitre.org/data/definitions/502.html
safe
public void writeData(LPDataOutput output) { output.writeInt(posX); output.writeInt(posY); output.writeInt(posZ); }
1
Java
CWE-502
Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
https://cwe.mitre.org/data/definitions/502.html
safe
public CoordinatesPopupGuiProvider(int id) { super(id); }
1
Java
CWE-502
Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
https://cwe.mitre.org/data/definitions/502.html
safe
public void writeData(LPDataOutput output) {}
1
Java
CWE-502
Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
https://cwe.mitre.org/data/definitions/502.html
safe
public void readData(LPDataInput input) {}
1
Java
CWE-502
Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
https://cwe.mitre.org/data/definitions/502.html
safe
public void readData(LPDataInput input) { super.readData(input); slot = input.readEnum(ModulePositionType.class); positionInt = input.readInt(); }
1
Java
CWE-502
Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
https://cwe.mitre.org/data/definitions/502.html
safe
public ModuleCoordinatesGuiProvider(int id) { super(id); }
1
Java
CWE-502
Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
https://cwe.mitre.org/data/definitions/502.html
safe
public void writeData(LPDataOutput output) { super.writeData(output); output.writeEnum(slot); output.writeInt(positionInt); }
1
Java
CWE-502
Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
https://cwe.mitre.org/data/definitions/502.html
safe
public void writeData(LPDataOutput output) { super.writeData(output); output.writeInt(invSlot); }
1
Java
CWE-502
Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
https://cwe.mitre.org/data/definitions/502.html
safe
public ModuleInHandGuiProvider(int id) { super(id); }
1
Java
CWE-502
Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
https://cwe.mitre.org/data/definitions/502.html
safe
public void readData(LPDataInput input) { super.readData(input); invSlot = input.readInt(); }
1
Java
CWE-502
Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
https://cwe.mitre.org/data/definitions/502.html
safe
public void readData(LPDataInput input) { super.readData(input); nbt = input.readNBTTagCompound(); }
1
Java
CWE-502
Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
https://cwe.mitre.org/data/definitions/502.html
safe
public void writeData(LPDataOutput output) { super.writeData(output); output.writeNBTTagCompound(nbt); }
1
Java
CWE-502
Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
https://cwe.mitre.org/data/definitions/502.html
safe
public UpgradeCoordinatesGuiProvider(int id) { super(id); }
1
Java
CWE-502
Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
https://cwe.mitre.org/data/definitions/502.html
safe
public void readData(LPDataInput input) { super.readData(input); positionInt = input.readInt(); }
1
Java
CWE-502
Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
https://cwe.mitre.org/data/definitions/502.html
safe
public void writeData(LPDataOutput output) { super.writeData(output); output.writeInt(positionInt); }
1
Java
CWE-502
Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
https://cwe.mitre.org/data/definitions/502.html
safe
public void writeData(LPDataOutput output) { super.writeData(output); output.writeBitSet(getFlags()); }
1
Java
CWE-502
Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
https://cwe.mitre.org/data/definitions/502.html
safe
public void readData(LPDataInput input) { super.readData(input); setFlags(input.readBitSet()); }
1
Java
CWE-502
Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
https://cwe.mitre.org/data/definitions/502.html
safe
public void writeData(LPDataOutput output) { super.writeData(output); output.writeBoolean(flag); }
1
Java
CWE-502
Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
https://cwe.mitre.org/data/definitions/502.html
safe
public void readData(LPDataInput input) { super.readData(input); flag = input.readBoolean(); }
1
Java
CWE-502
Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
https://cwe.mitre.org/data/definitions/502.html
safe
public void readData(LPDataInput input) { posX = input.readInt(); posY = input.readInt(); posZ = input.readInt(); }
1
Java
CWE-502
Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
https://cwe.mitre.org/data/definitions/502.html
safe
public CoordinatesPacket(int id) { super(id); }
1
Java
CWE-502
Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
https://cwe.mitre.org/data/definitions/502.html
safe
public void writeData(LPDataOutput output) { output.writeInt(posX); output.writeInt(posY); output.writeInt(posZ); }
1
Java
CWE-502
Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
https://cwe.mitre.org/data/definitions/502.html
safe
public void readData(LPDataInput input) { super.readData(input); direction = input.readForgeDirection(); }
1
Java
CWE-502
Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
https://cwe.mitre.org/data/definitions/502.html
safe
public void writeData(LPDataOutput output) { super.writeData(output); output.writeForgeDirection(direction); }
1
Java
CWE-502
Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
https://cwe.mitre.org/data/definitions/502.html
safe
public void readData(LPDataInput input) { super.readData(input); setInteger2(input.readInt()); }
1
Java
CWE-502
Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
https://cwe.mitre.org/data/definitions/502.html
safe
public void writeData(LPDataOutput output) { super.writeData(output); output.writeInt(getInteger2()); }
1
Java
CWE-502
Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
https://cwe.mitre.org/data/definitions/502.html
safe
public void writeData(LPDataOutput output) { super.writeData(output); output.writeInt(getInteger2()); }
1
Java
CWE-502
Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
https://cwe.mitre.org/data/definitions/502.html
safe
public void readData(LPDataInput input) { super.readData(input); setInteger2(input.readInt()); }
1
Java
CWE-502
Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
https://cwe.mitre.org/data/definitions/502.html
safe
public void writeData(LPDataOutput output) { super.writeData(output); output.writeInt(getInteger()); }
1
Java
CWE-502
Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
https://cwe.mitre.org/data/definitions/502.html
safe
public void readData(LPDataInput input) { super.readData(input); setInteger(input.readInt()); }
1
Java
CWE-502
Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
https://cwe.mitre.org/data/definitions/502.html
safe
public void readData(LPDataInput input) { super.readData(input); setInteger(input.readInt()); }
1
Java
CWE-502
Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
https://cwe.mitre.org/data/definitions/502.html
safe
public void writeData(LPDataOutput output) { super.writeData(output); output.writeInt(getInteger()); }
1
Java
CWE-502
Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
https://cwe.mitre.org/data/definitions/502.html
safe
public void readData(LPDataInput input) { setInteger(input.readInt()); }
1
Java
CWE-502
Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
https://cwe.mitre.org/data/definitions/502.html
safe
public void writeData(LPDataOutput output) { output.writeInt(getInteger()); }
1
Java
CWE-502
Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
https://cwe.mitre.org/data/definitions/502.html
safe
public void writeData(LPDataOutput output) { super.writeData(output); if (inventory != null) { output.writeByte(STACK_MARKER); output.writeInt(inventory.getSizeInventory()); for (int i = 0; i < inventory.getSizeInventory(); i++) { output.writeItemStack(inventory.getStackInSlot(i)); } } else if (stackList != null) { output.writeByte(STACK_MARKER); output.writeCollection(stackList, LPDataOutput::writeItemStack); } else if (identList != null) { output.writeByte(IDENT_MARKER); output.writeCollection(identList, LPDataOutput::writeItemIdentifierStack); } else if (identSet != null) { output.writeByte(IDENT_MARKER); output.writeCollection(identSet, LPDataOutput::writeItemIdentifierStack); } else { throw new IllegalStateException("Wont send packet without content"); } }
1
Java
CWE-502
Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
https://cwe.mitre.org/data/definitions/502.html
safe
public void readData(LPDataInput input) { super.readData(input); byte marker = input.readByte(); if (marker == STACK_MARKER) { stackList = input.readLinkedList(LPDataInput::readItemStack); } else if (marker == IDENT_MARKER) { identList = input.readLinkedList(LPDataInput::readItemIdentifierStack); } else { throw new UnsupportedOperationException("Unknown marker: " + marker); } }
1
Java
CWE-502
Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
https://cwe.mitre.org/data/definitions/502.html
safe
public void readData(LPDataInput input) { super.readData(input); final int itemID = input.readInt(); if (itemID != 0) { int stackSize = input.readInt(); int damage = input.readInt(); setStack(new ItemStack(Item.getItemById(itemID), stackSize, damage)); getStack().setTagCompound(input.readNBTTagCompound()); } else { setStack(null); } }
1
Java
CWE-502
Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
https://cwe.mitre.org/data/definitions/502.html
safe
public void writeData(LPDataOutput output) { super.writeData(output); if (getStack() != null) { output.writeInt(Item.getIdFromItem(getStack().getItem())); output.writeInt(getStack().stackSize); output.writeInt(getStack().getItemDamage()); output.writeNBTTagCompound(getStack().getTagCompound()); } else { output.writeInt(0); } }
1
Java
CWE-502
Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
https://cwe.mitre.org/data/definitions/502.html
safe
public void writeData(LPDataOutput output) { super.writeData(output); output.writeCollection(list, this); }
1
Java
CWE-502
Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
https://cwe.mitre.org/data/definitions/502.html
safe
public void readData(LPDataInput input) { super.readData(input); list = input.readArrayList(this); }
1
Java
CWE-502
Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
https://cwe.mitre.org/data/definitions/502.html
safe
public void writeData(LPDataOutput output) { super.writeData(output); output.writeBoolean(type != null); if (type != null) { output.writeEnum(type); output.writeInt(positionInt); } }
1
Java
CWE-502
Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
https://cwe.mitre.org/data/definitions/502.html
safe
public void readData(LPDataInput input) { super.readData(input); if (input.readBoolean()) { type = input.readEnum(ModulePositionType.class); positionInt = input.readInt(); } }
1
Java
CWE-502
Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
https://cwe.mitre.org/data/definitions/502.html
safe
public void writeData(LPDataOutput output) { super.writeData(output); output.writeNBTTagCompound(tag); }
1
Java
CWE-502
Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
https://cwe.mitre.org/data/definitions/502.html
safe
public void readData(LPDataInput input) { super.readData(input); tag = input.readNBTTagCompound(); }
1
Java
CWE-502
Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
https://cwe.mitre.org/data/definitions/502.html
safe
public void writeData(LPDataOutput output) { super.writeData(output); output.writeNBTTagCompound(tag); }
1
Java
CWE-502
Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
https://cwe.mitre.org/data/definitions/502.html
safe
public void readData(LPDataInput input) { super.readData(input); tag = input.readNBTTagCompound(); }
1
Java
CWE-502
Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
https://cwe.mitre.org/data/definitions/502.html
safe