alpine 3.8
obsolete weakness #25

1

Weakness Breakdown


Definition:

An obsolete weakness occurs when someone uses deprecated or obsolete functions when building a system. As a programming language evolves, some functions occasionally become obsolete.

Warning code(s):

This C routine is considered obsolete.

File Name:

gammu/src/gammu-1.39.0/gammu/depend/nokia/dct3.c

Context:

The highlighted line of code below is the trigger point of this particular Alpine 3.8 obsolete weakness.

 }

void DCT3DisplayOutput(int argc, char *argv[])
{
	unsigned char req[] = {N6110_FRAME_HEADER, 0x53,
			       0x01}; /* 1 = enable, 2 = disable */
	GSM_Error error;

	GSM_Init(TRUE);

	if (strstr(N6110Phone.models, gsm->Phone.Data.ModelInfo->model) == NULL) Print_Error(ERR_NOTSUPPORTED);
	CheckDCT3();

	gsm->User.UserReplyFunctions=UserReplyFunctions3;

	error=GSM_WaitFor (gsm, req, 5, 0x0d, 4, ID_User7);
	Print_Error(error);

	signal(SIGINT, interrupt);
	printf("Press Ctrl+C to break...\n");
	printf("Entering monitor mode...\n\n");

	while (!gshutdown) {
		GSM_ReadDevice(gsm,TRUE);
		usleep(10000);
	}

	req[4] = 0x02;
	error=GSM_WaitFor (gsm, req, 5, 0x0d, 4, ID_User7);
	Print_Error(error);

	GSM_Terminate();
}
#endif

GSM_Reply_Function UserReplyFunctions3[] = {
#ifdef GSM_ENABLE_NOKIA6110
	{DCT3_ReplyDisplayOutput,	"\x0D",0x03,0x50,ID_IncomingFrame	},
	{DCT3_ReplyDisplayOutput,	"\x0D",0x03,0x54,ID_User7	 	},
#endif

	{DCT3_ReplyEnableSecurity2,	"\x40",0x02,0x64,ID_EnableSecurity	},
	{DCT3_ReplyResetTest36,		"\x40",0x02,0x65,ID_User2 	 	},
	{DCT3_ReplyGetADC,		"\x40",0x02,0x68,ID_User3 	 	},
	{DCT3_ReplyGetPPS,		"\x40",0x02,0x6A,ID_User4 	 	},
	{DCT3_ReplySetPPS,		"\x40",0x02,0x6B,ID_User4 	 	},
	{DCT3_Reply61GetSecurityCode,	"\x40",0x02,0x6E,ID_User6 	 	},
	{DCT3_ReplySimlockInfo,		"\x40",0x02,0x8A,ID_User3	 	},
#ifdef GSM_ENABLE_NOKIA6110
	{DCT3_ReplySetOperatorName,	"\x40",0x02,0x8B,ID_User7	 	}, 

The registered trademark Linux® is used pursuant to a sublicense from the Linux Foundation, the exclusive licensee of Linus Torvalds, owner of the mark on a world­wide basis.