Skip to content

Commit

Permalink
Fixed a couple of buffer overflow vulnerabilities.
Browse files Browse the repository at this point in the history
  • Loading branch information
danij committed Mar 12, 2007
1 parent d2a284c commit 37f4e66
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion doomsday/engine/portable/src/p_control.c
Expand Up @@ -501,7 +501,7 @@ boolean P_IsValidControl(const char *cmd)
*/
boolean P_ControlExecute(const char *cmd)
{
char name[MAX_DESCRIPTOR_LENGTH], *ptr;
char name[MAX_DESCRIPTOR_LENGTH + 1], *ptr;
uint idx;
int console, localPlayer = 0;
togglestate_t newState = TG_TOGGLE;
Expand Down
8 changes: 4 additions & 4 deletions doomsday/plugins/common/src/p_xgline.c
Expand Up @@ -552,13 +552,13 @@ int XL_AutoGenType(int id, linetype_t *outptr)
#endif
}

/*
* Returns true if the type is defined.
/**
* @return <code>true</code> if the type is defined.
*/
linetype_t *XL_GetType(int id)
{
linetype_t *ptr;
char buff[5];
char buff[6];

// Try finding it from the DDXGDATA lump.
ptr = XG_GetLumpLine(id);
Expand Down Expand Up @@ -598,7 +598,7 @@ float XG_RandomPercentFloat(float value, int percent)
return value * (1 + i);
}

/*
/**
* Looks for line type definition and sets the
* line type if one is found.
*/
Expand Down

0 comments on commit 37f4e66

Please sign in to comment.