mirror of
https://github.com/moibenko/mtx.git
synced 2026-09-19 06:26:31 +00:00
Fix: Serial Number for one os systems had non alpha numeric tail.
This commit is contained in:
+5
-7
@@ -26,6 +26,7 @@
|
|||||||
* overflow :-(. That could be important if mtxl is SUID for some reason.
|
* overflow :-(. That could be important if mtxl is SUID for some reason.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <ctype.h>
|
||||||
#include "mtx.h"
|
#include "mtx.h"
|
||||||
#include "mtxl.h"
|
#include "mtxl.h"
|
||||||
|
|
||||||
@@ -630,13 +631,10 @@ void copy_char_buffer(unsigned char *src, unsigned char *dest, int num)
|
|||||||
|
|
||||||
for (i=0; i < num; i++)
|
for (i=0; i < num; i++)
|
||||||
{
|
{
|
||||||
*dest = *src++;
|
if (isalnum(*src)) {
|
||||||
|
*dest = *src;
|
||||||
if ((*dest < 32) || (*dest > 127))
|
}
|
||||||
{
|
src++;
|
||||||
*dest = 0;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
dest++;
|
dest++;
|
||||||
}
|
}
|
||||||
*dest = 0;
|
*dest = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user