Commits

Anonymous committed eaa6fc8

Using uint16_t instead of uint32_t on line 87 in src/raw.cc for a value that is out of range, Update version in package.json to 1.2.2

  • Participants
  • Parent commits 43cfb92

Comments (0)

Files changed (3)

    error after a number of pings - the underlying `uv_poll_t` handle was being
    closed twice
 
+## Version 1.2.2 - 21/09/2013
+
+ * Using uint16_t instead of uint32_t on line 87 in src/raw.cc for a value
+   that is out of range
+
 # Roadmap
 
 In no particular order:

File package.json

 {
   "name": "raw-socket",
-  "version": "1.2.1",
+  "version": "1.2.2",
   "description": "Raw sockets for Node.js.",
   "main": "index.js",
   "directories": {
 		return scope.Close (args.This ());
 	}
 	
-	uint16_t start_with = args[0]->ToUint32 ()->Value ();
+	uint32_t start_with = args[0]->ToUint32 ()->Value ();
 
 	if (start_with > 65535) {
 		ThrowException (Exception::TypeError (String::New (
 		length = new_length;
 	}
 	
-	uint16_t sum = checksum (start_with, (unsigned char *) data + offset,
-			length);
+	uint16_t sum = checksum ((uint16_t) start_with,
+			(unsigned char *) data + offset, length);
 
 	Local<Integer> number = Integer::NewFromUnsigned (sum);